Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Spiltting the address into three
Message
De
25/02/2000 11:20:32
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00337565
Message ID:
00337571
Vues:
26
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform