Title |
Test
Find
Valid UK Post Codes Upper and Lower Case
|
Expression |
^ ?(([BEGLMNSWbeglmnsw][0-9][0-9]?)|(([A-PR-UWYZa-pr-uwyz][A-HK-Ya-hk-y][0-9][0-9]?)|(([ENWenw][0-9][A-HJKSTUWa-hjkstuw])|([ENWenw][A-HK-Ya-hk-y][0-9][ABEHMNPRVWXYabehmnprvwxy])))) ?[0-9][ABD-HJLNP-UW-Zabd-hjlnp-uw-z]{2}$ |
Description |
Matches valid UK post codes in both upper and lower case, allowing for one or zero spaces between outcode and incodes. |
Matches |
SW112LE | SW11 2LE | sw112le |
Non-Matches |
12CR0LE | 12CR 0LE | SWLE05 |
Author |
Rating:
Not yet rated.
Gareth Wright
|
Source |
|
Your Rating |
|
Title: Mr
Name: Gareth Wright
Date: 5/12/2008 4:45:17 AM
Comment:
Not sure on there format Lyndon so can't comment at the moment.
Why don't you click test on the right of my reg exp and give a few a try. Post back your results.
Thanks,
Gareth
Title: Post Code RegExp Question
Name: Lyndon
Date: 4/26/2008 9:53:33 AM
Comment:
Hi Gareth
Does this regexp account for BFO post codes?
That is British Forces Overseas.
Regards
Lyndon
lyndon@infomediauk,net
Title: Post Code RegExp Question
Name: Lyndon
Date: 4/26/2008 9:53:10 AM
Comment:
Hi Gareth
Does this regexp account for BFO post codes?
That is British Forces Overseas.
Regards
Lyndon
lyndon@infomediauk,net