SPrelewicz
Programmer
I have a general "Address" field in a text data set. I need to extract from the general address field specific elements, such as "Address 1", Addy2", City", etc..
The problem is the formatting of that field is tough for this. Occassionay, theres a comma after the building number, occassionally there isnt any commas, spacing is also inconsistent. So, here are some examples [UK addresses]
"Philton, Kemnay, Inverurie, Aberdeenshire AB51 5PB"
"12, Morlich Avenue, Ellon, Aberdeenshire AB41 9GJ"
"5, Vaynes Park Brechin Angus DD9 6LA"
The fields I need are (address1, Address2*, City, Region*, Post Code) where *=optional.
Ive tried working backwards, like "Find two blocks of chars separated by a whitespace in $1, etc...but my regex abailites are average. Can anyone offer any advixe?
Thanks you,
Scott
The problem is the formatting of that field is tough for this. Occassionay, theres a comma after the building number, occassionally there isnt any commas, spacing is also inconsistent. So, here are some examples [UK addresses]
"Philton, Kemnay, Inverurie, Aberdeenshire AB51 5PB"
"12, Morlich Avenue, Ellon, Aberdeenshire AB41 9GJ"
"5, Vaynes Park Brechin Angus DD9 6LA"
The fields I need are (address1, Address2*, City, Region*, Post Code) where *=optional.
Ive tried working backwards, like "Find two blocks of chars separated by a whitespace in $1, etc...but my regex abailites are average. Can anyone offer any advixe?
Thanks you,
Scott