Title |
Test
Find
Dutch zipcode
|
Expression |
^[1-9][0-9]{3}[ ]?(([a-rt-zA-RT-Z]{2})|([sS][^dasDAS]))$ |
Description |
Dutch zipcode. The non-matching code does not match because lettercombinations SS, SA and SD are not allowed. (historic reasons ?).
|
Matches |
3545CA |
Non-Matches |
3534 SS |
Author |
Rating:
Erik
|
Source |
Me, Erik |
Your Rating |
|
Title: Not proper
Name: Ronald
Date: 5/24/2012 8:55:33 AM
Comment:
All zip codes ending with an S are considered to be false, but i know in fact there are zip codes ending with an S.
Title: The term 'Dutch' is wrong!
Name: Oscar
Date: 8/31/2011 12:16:14 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: previous comment is at least true when using with JavaScript, ymmv
Name: Edo
Date: 7/19/2011 4:33:30 AM
Comment:
My previous comment was when using within JavaScript. Try the 'test' button and check it out with 1566LS for example.
Might work within other context (not tested by me)
Title: Beware: handles anything with 'S' in the character part incorrectly!
Name: Edo
Date: 7/19/2011 4:29:28 AM
Comment:
I found out that this expression not only prevents SS, SA, SD but also invalidates combinations like LS, TS, ST etcetera.
Title: I posted a better one
Name: Erik
Date: 3/22/2011 9:16:43 AM
Comment:
Indeed, Commentor's remark is correct. I posted a better one.
Also, the letters F, I, Q etc are in use nowadays. In the early days of dutch postal codes, they were not used because of confusion with other letters (O and Q f.i.)
So look for the more recent one.
Title: Very good
Name: Barry
Date: 6/26/2009 9:17:11 AM
Comment:
This regex is the one-and-only for dutch zipcodes. There are a lot of other on this site, but none are as complete as this one. Nice job, Erik!
Title: Comment
Name: Commentor
Date: 3/1/2007 8:29:38 AM
Comment:
Yes must be, still dating to Nazi institutions in WWII. Better reverse that dasDAS as it now will allow 1000 A$ etc.