Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parsing a Street Address into Separate Fields
Message
From
11/08/2006 10:57:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
11/08/2006 10:02:34
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01144790
Message ID:
01144823
Views:
19
Tracy,
If you can make me (a foreigner) understand the rules at parsing then you'd be a step closer to solution:) ie:

100 N Main St NW Ste 110

I can't parse this for sure. N Main is street and NW suffix? Or N prefix and NW suffix?

3001 No W Rubick Ave && number=3001, st_prefix = No, Street=W Rubick

Where did No come to be prefix? W looked to be prefix to me etc.

PS: Don't explain to me really. Just signifying even for a human it's hard to get the rules (you've grown up with it and laughing at how stupid I am maybe:)
Cetin

>This must've been done a thousand times already. I have parsed addresses before but I cannot seem to wrap my head around this today. (Friday)
>
>Some examples of user typed values:
>
>100 N Main St
>3001 No W Rubick Ave     && number=3001, st_prefix = No, Street=W Rubick, st_type = Ave
>12 Sycamore Dairy Rd NW  && number = 12, street=Sycamore Dairy, st_type=Rd, st_suffix = NW
>1312 S Cain St E Suite A10 && number = 1313, st_prefix=S, street=Cain, st_type=St, st_suffix=E, apt_room=Suite A10
>100 N Main St NW Ste 110
>210 Jones Dr Apt 1E
>8700 Smith Rd
>
>Parse the values typed above into these fields:
>
>number c(10)        && 100, 3001, 12, 1312, 100, 210, ...
>st_prefix c(10)     && NW, S, E, NE...
>street c(30)        && Main, Cain, ...
>st_type c(10)       && Blvd, ST, AV, ...
>st_suffix c(10)     && NW, S, E, NE, ...
>apt_room c(10)      && Apt 102, Suite 109, etc...
>
>
>Anyone up to the task on a Friday?
>
>TIA,
>Tracy
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform