RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Expressions by User

   Displaying page 1 of 1 pages; Items 1 to 3
Title Test Details UK Postcodes
Expression
^[A-PR-UWYZ]([0-9]([A-HJKSTUW]|[0-9])?|[A-HK-Y][0-9]([ABEHMNPRVWXY]|[0-9])) [0-9][ABD-HJLNP-UW-Z]{2}|GIR 0AA$
Description
Validates all UK Postcodes based on format given at cabinetoffice.uk.gov. Must be in uppercase before validation.
Matches
A4 7BD | C45 9NZ | AB90 5FG | GIR 0AA
Non-Matches
A47BD | 34 6GJ | AN5P 3XY
Author Rating: Not yet rated. Jeff Churchill
   Displaying page 1 of 1 pages; Items 1 to 3

Copyright © 2001-2025, RegexAdvice.com | ASP.NET Tutorials