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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
^[1-9]{1}[0-9]{3}\s{0,1}?[a-zA-Z]{2}$
Description
Used for dutch postalcodes; no leading zero. 4 numbers and 2 letters.
Matches
1234AB | 1234 AB | 1234 ab
Non-Matches
0123AB | 123AA
Author Rating: Not yet rated. Michiel Lankamp
Source
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
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: The term 'Dutch' is wrong!
Name: Oscar
Date: 8/31/2011 12:18:59 AM
Comment:
The term 'Dutch' is wrong! This is a postal code from The Netherlands, not 'Dutch'! 'Dutch' is NOT a country but a language which is spoken in different countries (with different forms of postal codes). As such, please do not use such a regexp if you know you' users speak 'Dutch'. Their postal code might be quite different!


Title: Simplification
Name: Troy Farrell
Date: 9/25/2003 1:27:54 AM
Comment:
Can you simplify this to ^[1-9]\d{3}\s?[a-zA-Z]{2}$


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