Hi Taco,

I did something like this a while ago.. I might
Be missing a kep point here but I used something
Like.. 

#listLast(string," ")#
Then compared this string to an array of valid
Street types I had..

Mind you, this was done in CF after the data was returned
>From the DB.. Not sure exactly how you are using your
Regex.. And this wont deal with PO boxes.. 

Regards,

Adam Chapman
Virtualtours.com.au
mailto:[EMAIL PROTECTED] 

Phone: 1300 366 122
Int: +61 3 9720 5733
Fax: +61 3 9720 6377

-----Original Message-----
From: Taco Fleur [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 14, 2003 9:58 AM
To: CFAussie Mailing List
Subject: [cfaussie] 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 

---
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