Other Resources:
Validating United Kingdom postcodes
How to write a regular expression to validate United Kingdom postcodes?
For example, EC1A 1BB is a valid UK postcodes.
✍: Guest
![]()
Here is the regular expression to validate United Kingdom postcodes:
[A-Z]{1,2}\d[A-Z\d]? \d[ABD-HJLNP-UW-Z]{2}
[A-Z]{1,2} - 1 or 2 letters
\d - A digit
[A-Z\d]? - An optional letter or digit
- A space
\d - A digit
[ABD-HJLNP-UW-Z]{2} - Any 2 letters except CIKMOV
2013-01-29, 0👍, 0💬
Popular Posts:
Are you having problems using regular expressions when processing text strings in your applications ...
How to write a regular expression to validate GUID (Globally Unique IDentifier) or UUID (Universally...
According to the IEEE 802 specification, a MAC address has 6 groups of 2 hexadecimal digits separate...
A free online regular expression test tool that allows to try you regular expression pattern and see...
How to capture the Soso Spider entries from Web log file? Here are some Web log file entries: 127.0....