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 7
Title Test Details Pattern Title
Expression
^([A-Z]{1,2}[0-9]{1,2}|[A-Z]{3}|[A-Z]{1,2}[0-9][A-Z])( |-)[0-9][A-Z]{2}
Description
Checks whether the string specified is in the same format as the UK postcode format defined on: http://www.magma.ca/~djcl/postcd.txt It allows: A = Letter N = Number AN NAA, ANA NAA, ANN NAA, AAN NAA, AAA NAA (rare), AANN NAA, AANA NAA It gives the option to have the two parts of the uk postcode to be separated by a space or a hyphen. (restriction is set to all-capitals)
Matches
AA11 1AA | AA1A 1AA | A11-1AA
Non-Matches
111 AAA | 1AAA 1AA | A1AA 1AA
Author Rating: Not yet rated. Henk de Vries
Title Test Details Pattern Title
Expression
^[1-9]{1}[0-9]{3}$
Description
Postcode for Belgium
Matches
1234
Non-Matches
123 | 123A
Author Rating: Not yet rated. Henk de Vries
Title Test Details Pattern Title
Expression
^[A-Z]{1}( |-)?[1-9]{1}[0-9]{3}$
Description
Postcode for Germany
Matches
A-1234 | A 1234 | A1234
Non-Matches
AA-1234 | A12345
Author Rating: Not yet rated. Henk de Vries
Title Test Details Pattern Title
Expression
^(F-)?((2[A|B])|[0-9]{2})[0-9]{3}$
Description
Postcode check for France (including colonies) ----- Edited; sorry I didn't know about Corsica, no offense :)
Matches
12345 | F-12345 | F-2B100
Non-Matches
F12345 | F-123456 | 123456
Author Rating: Not yet rated. Henk de Vries
Title Test Details Pattern Title
Expression
^(V-|I-)?[0-9]{4}$
Description
Postcode check for Italy (including possible Vatican/Italy indications)
Matches
1234 | V-1234
Non-Matches
12345
Author Rating: The rating for this expression. Henk de Vries
Title Test Details Pattern Title
Expression
^[1-9]{1}[0-9]{3} ?[A-Z]{2}$
Description
Postcode check for Netherlands
Matches
1234 AB | 1234AB
Non-Matches
123AB | 1234AAA
Author Rating: The rating for this expression. Henk de Vries
Title Test Details Pattern Title
Expression
^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$
Description
Postcode check for Spain
Matches
12345 | 10234 | 01234
Non-Matches
00123
Author Rating: Not yet rated. Henk de Vries
   Displaying page 1 of 1 pages; Items 1 to 7

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