Extracting first part of a post code
Posted: Sun Apr 02, 2006 6:07 am
Hi, im working with UK postcodes, and need to validate postcodes being entered into the system, postcodes are usually in the following format
BB3 5TT
I need to extract the first part of the postcode, which are letters then numbers, and come in the following foormat :
BB3 or
BB10 or
B3 or
B10
The above shows sometimes it is a pair of letters thhen a number (one or two digits), or just a letter then a number (again one or two digits)
How would I go about extracting this information from the original postcode in reg exp?
Thanks in advanvce
BB3 5TT
I need to extract the first part of the postcode, which are letters then numbers, and come in the following foormat :
BB3 or
BB10 or
B3 or
B10
The above shows sometimes it is a pair of letters thhen a number (one or two digits), or just a letter then a number (again one or two digits)
How would I go about extracting this information from the original postcode in reg exp?
Thanks in advanvce