Title |
Test
Find
Pattern Title
|
Expression |
^(([A-Z]{1,2}[0-9]{1,2})|([A-Z]{1,2}[0-9][A-Z]))\s?([0-9][A-Z]{2})$ |
Description |
Matches UK postcodes of the below formats. The space is optional.
AN NAA
AAN NAA
ANN NAA
ANA NAA
AANA NAA
AANN NAA
|
Matches |
A11AA | AA1A 1AA | AA11 1AA |
Non-Matches |
AAA 1AA | AA11A 1AA | AAA1AA |
Author |
Rating:
Phil A
|
Source |
Andy and myself |
Your Rating |
|
Title: slight ammend
Name: _Belial
Date: 1/25/2005 12:28:00 PM
Comment:
you need to change the above regex to let you use lower-case letters in postcodes :)
^(([A-Za-z]{1,2}[0-9]{1,2})|([A-Za-z]{1,2}[0-9][A-Z]))\s?([0-9][A-Za-z]{2})$