Trouble pulling data using reg exp.
Posted by Chris_Isaac (Chris Isaac), 16 June 2003Hi
I'm trying to pull out the County out of out of an address field ($addy). I can get either the town and county together or the county and postcode. I tried to do another reg exp on the result of the 2nd option above, but it just prints out 'Array'. Any ideas please??
Posted by admin (Graham Ellis), 16 June 2003This code:
on similar (?) address data gave me ouput including ...
My addresses had comma separated lines and I've assumed that the chunk before the postcode was the county. In practice, the county was missing on some of the data and I got towns such as "Bath" reported back for a few counties. HOWEVER - it's the program you're really looking at.
I've pub (extra) round brackets around the county, and I've referred to $gotten for the first bracket match and $gotten for the second bracket match. $gotten would refer to the whole match string (not of any interest to me) and $gotten just says "Array". By the way - NO SPACE between $gotten and  within double quotes - if you do, it says Array  ....
Posted by Chris_Isaac (Chris Isaac), 16 June 2003Thanks, thats cured it!
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: email@example.com • WEB: http://www.wellho.net • SKYPE: wellho