Displaying page
of
pages;
Items to
Title |
Test
Details
UK Postcode Validation
|
Expression |
^(GIR ?0AA|(?:[A-PR-UWYZ](?:\d|\d{2}|[A-HK-Y]\d|[A-HK-Y]\d\d|\d[A-HJKSTUW]|[A-HK-Y]\d[ABEHMNPRV-Y])) ?\d[ABD-HJLNP-UW-Z]{2})$
|
Description |
This regex matches all valid, current UK Postcodes, including Girobank and non-geographic postcodes, irrespective of whether they contain a space. It does not include overseas territories.
Adapted from the BS7666 postcode rules at: http://www.cabinetoffice.gov.uk/govtalk/schemasstandards/e-gif/datastandards/address/postcode.aspx
|
Matches |
M1 1AA | M60 1NW | CR2 6XH | DN55 1PT | W1A 1HQ | EC1A 1BB | GIR 0AA
|
Non-Matches |
Q1 1AA | M60 1CW | 5R2 6XH | DJ55 1PT | W1M 1HQ | EC1D 1BB | GIR 1AA
|
Author |
Rating:
Ti Marner
|
Displaying page
of
pages;
Items to