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:
How to write a regular expression to validate GUID (Globally Unique IDentifier) or UUID (Universally...
How to write a regular expression to parse key-value entries from Windows .INI files? Here is an exa...
How to capture the MSN (Microsoft Network) bot entries from Web log file? Here are some Web log file...
Are you having problems using regular expressions when processing text strings in your applications ...
Are you having problems using regular expressions when processing text strings in your applications ...