- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
UK Postal Codes - The code is normally written in capital letters with a space between the outer and inner parts; it is understandable if the space is omitted. This regular expression validates upper or lower case with or without the space:
CF1 2AA | cf564fg
a1234d | A12 77Y
Author Rating: Not yet rated. Scott Pite
Source Created by John Dyke
Your Rating
Bad Good

Enter New Comment

Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Title: Postcode format
Name: Grahame
Date: 11/12/2005 7:45:01 AM
UK postal code have excluded char's in given positions; for example: - FORMAT EXAMPLE AN NAA M1 1AA ANN NAA M60 1NW AAN NAA CR2 6XH AANN NAA DN55 1PT ANA NAA W1A 1HQ AANA NAA EC1A 1BB Please note the following:- The letters Q, V and X are not used in the first position The letters I,J and Z are not used in the second position. The only letters to appear in the third position are A, B, C, D, E, F, G, H, J, K, S, T, U and W. The second half of the postcode is always consistent numeric, alpha, alpha format and the letters C, I, K, M, O and V are never used.

Copyright © 2001-2019, | ASP.NET Tutorials