Title: Calling all RegEx Guru's!!!!

Morning guys and gals,

I could use a bit of input and help on the following regex which is trying to seperate the street types from address records.

(\s+|\d+)((streets|street|str|st)|(roads|road|raod|rd)|(avenue|ave|av)|(terrace|tce)|(corner|cnr)(drive|dr)|(highway)|(parade)|(square)|(lane)|(place|plc)|(esplanade)|(court)|(plaza)|(parkway)|(crescent)|(way))(\s+|,+|\.+)

What it is saying is (I hope)
There needs to be at least either (one or more spaces OR one or more digits)
Then some variations on street types
Ending with at least (one space or more OR one or more commas OR one or more dots)

What am I missing?
I have a problem trying to get the values if they are at the end of a string, I tried some testing on the following string like so

<cfset regExStreetType = "$street">
<cfset string = "10 bundaberg street">
<cfset streetType = refindNocase(variables.regExStreetType, variables.string, 1, "true")>

#lcase(trim(mid(variables.string, streetType.pos[1], streetType.len[1])))#

But no luck..

I think I got the PO box pretty well sussed, I know it's not flawless but it seems to only retrieve the PO BOx stuff.
<cfset regExPOBox = "\s*PO\s*BOX\s*\d*">

TIA


Taco Fleur
07 3535 5072

Tell me and I will forget
Show me and I will remember
Teach me and I will learn

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
MXDU2004 + Macromedia DevCon AsiaPac + Sydney, Australia
http://www.mxdu.com/ + 24-25 February, 2004

Reply via email to