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 1
Title Test Details UK Postcode
Expression
^(GIR\\s{0,1}0AA|[A-PR-UWYZ]([0-9]{1,2}|([A-HK-Y][0-9]|[A-HK-Y][0-9]([0-9]|[ABEHMNPRV-Y]))|[0-9][A-HJKS-UW])\\s{0,1}[0-9][ABD-HJLNP-UW-Z]{2})$
Description
This regex have been created as per the information provided on http://www.govtalk.gov.uk/gdsc/html/noframes/PostCode-2-1-Release.htm. This expression will allow the postcodes with space or without space.
Matches
GIR 0AA, GIR0AA, M1 1AA, EC1A 1BB
Non-Matches
E14 5LQH
Author Rating: Not yet rated. Debashish Saha
   Displaying page 1 of 1 pages; Items 1 to 1

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