- The first Regular Expression Library on the Web!

Please support RegExLib Sponsors


Regular Expression Details

Title Test Find Pattern Title
Validates Dutch Postal Codes (ZipCode). There was a previous one listed here, but it's not entirely correct. Namely that dutch postal codes can contain a zero but cannot start with one, so this one is the adjusted version.
1234AB | 1234 AB | 1001 AB
0123AB | 1234A B | 0123 AB
Author Rating: The rating for this expression. Jos Krause
Source Jon van Leeuwen, Ronald Mensenkamp
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: Agent Mark
Name: [email protected]
Date: 7/17/2021 11:49:46 PM
Good news!!! Good news!!!, Do you want to live a rich,healthy and famous life? Do you want to get rich immediately and be out of suffering? Do you want the world to recognize you and listen to you? when you speak? do you want to be in power and control? if yes, here is a good tip- join the “ILLUMINATI ORGANIZATION”, you may ask “How Can I Join” , the answer is simple all you have to do is contact us via WhatsApp or Email ( contact information will be listed below)ELEVATE YOURSELF FROM POVERTY. Do not hesitate to contact us If You Require our service in any way Here's our contact info EMAIL: [email protected] WHATSAPP AND CALLS: (+1 760-892-2577) TELEGRAM: (07052719658). WARNING: only those who are interested to become a member of the church of Satan are allow to visit office or send a mail to the email address below. Do not contact if you are not interested and once you contact there is no going back. so think before contacting. BEWARE!!!

Title: refinement
Name: Jan C. de Graaf
Date: 1/11/2013 10:05:21 AM
Seems "1831 sA" still is valid now... I propose: ^[1-9][\d]{3}\s?(?!([sS][adsADS]))([a-eghj-opr-tv-xzA-EGHJ-OPR-TV-XZ]{2})?$

Title: The term 'Dutch' is wrong!
Name: Oscar
Date: 8/30/2011 11:58:59 PM
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: not strict enough
Name: Erik Terwiel
Date: 3/22/2011 8:49:36 AM
This is too simple: letter combinations SS, SD and SA are not allowed for historic reasons. F, I, O, Q, U and Y are in use nowadays. I posted a correct(er) one

Title: Reply to Sam's message
Name: Jrf
Date: 9/21/2005 9:58:11 PM
Sam, I was just looking at your modification and have two questions for you: 1. You say that the letters "F, I, O, Q, U and Y" can't be used, but in the regex you still allow the o (O). Typo ? and if so, in the regex or in the earlier statement ? I'd appreciate it if you could give me a link to the official docs for the specification of the postcodes which contains these exceptions. 2. With your regex, the postal code "1234" (without any letters) WILL pass. This shouldn't happen. I've adjusted your sample to take this into account: ^[1-9][\d]{3}\s?(?!(sa|sd|ss|SA|SD|SS))([a-eghj-opr-tv-xzA-EGHJ-OPR-TV-XZ]{2})$ and in case the o from question 1 should be excluded the sample will become: ^[1-9][\d]{3}\s?(?!(sa|sd|ss|SA|SD|SS))([a-eghj-npr-tv-xzA-EGHJ-NPR-TV-XZ]{2})$ Grz, Jrf

Title: Nice but need modification
Name: SamB PCF
Date: 6/9/2005 9:22:54 AM
Dutch postal codes cannot contain "SA", "SD" and "SS" and those letters : F, I, O, Q, U and Y. You could use this one : ^[1-9][\d]{3}\s?(?!(sa|sd|ss|SA|SD|SS))([a-eghj-opr-tv-xzA-EGHJ-OPR-TV-XZ]{2})?$

Title: Nice
Name: Joseph
Date: 12/11/2003 4:46:39 AM
I was wondering why the other one was giving me headaches, thanks for the updated one!

Copyright © 2001-2021, | ASP.NET Tutorials