If ( /^(\d+\w?)\s+([\w\s]+),([\s\w]+)/ )

Not tested. 

Reads as
Digits at beginning of line possibly followed by letters.
House number stored in $1
Followed by any number of spaces
Followed by words or white space before a comma.
Street Name and road type stored in $2
Following the comma white space or word characters.
City stored as $3.

HTH
Paul
-----Original Message-----
From: Ben Crane [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 24, 2003 6:41 AM
To: [EMAIL PROTECTED]
Subject: multiple Regex Q


Hi all,

Haven't used perl in a while and now I've got some
regex stuff to do and need a couple pointers.
I'm stripping address data into BS7666 (GIS format)
format and an example of the data is:

rushey way, lower earley
waterloo rd, unit 4
34a essex road, wokingham

I need to break the data into:

HouseNumber
RoadNumber
RoadName
Parish

How do I seperate regex code to look for a
housenumber, then text before and after a ","?

I was thinking (eg):
my ($a, $b) = /[0-9]+/ for the numbers, but how do I
then get the regex to match a number, THEN look for
the next regex? Is there a regex break that specifies
the match to each seperate regex?

Regards
Ben



__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to