GetCityStateZip

Description

Extracts a US city state and zip from the input.  This function is used to parse out a City, State, and ZIP code from a given input string.

Syntax

target.strlib.GetCityStateZip( input, city, state, zip )

city (output) - City

state (output) - State

zip (output) - ZIP code

Return value

none - Use this function to parse a sub address rather than to find an address.

Sample


'---------- Start ----------

Function Start

Dim str, city, state, zip, address

str = "The conference will be held at 742 Willow Drive, Pensauken North Carolina,                55381"

target.strlib.GetCityStateZip str, city, state, zip

trg.Message( city&"|"&state&"|"&zip )

trg.Sleep(5000)

end function

In this case GetCityStateZip parses the input string and extracts only the city, state, and zip,

See also

Platform Objects and Methods

Trim

Split

Mid