Title |
Test
Find
Pattern Title
|
Expression |
^((([A-PR-UWYZ](\d([A-HJKSTUW]|\d)?|[A-HK-Y]\d([ABEHMNPRVWXY]|\d)?))\s*(\d[ABD-HJLNP-UW-Z]{2})?)|GIR\s*0AA)$ |
Description |
matches uk postcodes according to specifications found at: http://www.govtalk.gov.uk/gdsc/html/noframes/PostCode-2-1-Release.htm |
Matches |
M1 1AA | EC1A 1BB | DN55 1PT |
Non-Matches |
SW17 8CB |
Author |
Rating:
Not yet rated.
Chris Linseman
|
Source |
|
Your Rating |
|
Title: Fails on lower case
Name: Kumar
Date: 2/19/2009 4:47:43 AM
Comment:
The reg ex fails if the post code is entered in lower case.
Title: London postcodes
Name: Rob Kent
Date: 4/24/2008 11:14:04 AM
Comment:
This pattern doesn't match London postcodes, N1, E1 etc.
Title: sorry
Name: Iain
Date: 9/18/2006 9:28:21 AM
Comment:
wrong one (By the way take out the ^ and $) and it works
Title: Using asp.net
Name: Iain
Date: 9/18/2006 9:27:12 AM
Comment:
Ok I'm having real problems trying to get this to work with the regularexpressionvalidator in asp.net visual studio , why whould this be?
any takers??