Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting City, Zipcode, State and Country from address

Status
Not open for further replies.

fhlee

Technical User
Jan 23, 2002
133
TW
Hi,
Does anyone have a pointer for me on where to start searching on how I do this?

I have a database of many many addresses, but they are in free text form: ie: Thomas Eddison, 231st E Street, California, 94201, USA.

However, they are not "conforming". For example, some will be E, some will be East, Some will use Street, some St., California can be CA. USA can be United States of America, and so on and so forth.

From the free text, I need to extact out the Name, Street, City, State, Zipcode & country.

Have anyone does this kind of extraction before? I understand that this is complicated as it also need to do data cleansing ... Any pointer on how I can achieve this?

Sharing of prev experience will be greatly appreciated. Thanks a million in advance.



~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
 
if they are separated by commas, as you have given an example, it's not too hard to separate them. something like this:
Code:
addr_array = split(whole_addr, ",")
nam = addr_array(0)
str = addr_array(1)
cty = addr_array(2)
sta = addr_array(3)
zip = addr_array(4)
cnt = addr_array(5)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top