Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Spiltting the address into three
Message
From
25/02/2000 11:20:32
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00337565
Message ID:
00337571
Views:
24
I wrote a parser at one point but no longer have the code.

It's not that hard to draw heuristical rules to follow. In short, what you want to do is break the address down into "words". High probability that the first word is the street number. If there are more than 3 words, then check the last to see if a suite number or office number. If not, then the last word is the "Ave" or "St" and the middle words are the name of the street. If so, then the middle words are the street name, the second to last is the "Ave" or "St".

To trap standard abbreviations, you want to build a table of them and check against it.


>I'm sure someone has done this before. Looking for some quick code...
>
>Address: 12345 ABC ST
> 123 NBC AVE
> 1432 CBS DR
>
>Have to trun each in thre delimited fields.
>
>The syntax i've been working with goes something like"
>A = substr(property.address, 1," ")
>B = sbustr ( property.addresws, " ", " ")
>C = substr(property.address, (find where the streetname stops), (where the street suffix begins))
>
>Anybody got some code laying on in a drawer somewhere that does this?
>
>Thanks
>CMH.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform