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

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Pattern Title
Expression
(^\+[0-9]{2}|^\+[0-9]{2}\(0\)|^\(\+[0-9]{2}\)\(0\)|^00[0-9]{2}|^0)([0-9]{9}$|[0-9\-\s]{10}$)
Description
Regular expression to evaluate dutch-style phone numbers. Possible example prefixes: +31, +31(0), (+31)(0), 0, 0031 followed by 9 numbers (which can contain a space or -).
Matches
+31235256677 | +31(0)235256677 | 023-5256677
Non-Matches
+3123525667788999 | 3123525667788 | 232-2566778
Author Rating: The rating for this expression. Jon van Leuven
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: Dutch phone number
Name: BJ
Date: 5/13/2014 11:50:16 AM
Comment:
The expression allows a total of 11 digits when the first one is 0 (zero). i.e. 01234567899 The expression allows 10 digits when the leading zero is included in +31(0) i.e. +31(0)1234567899


Title: The term 'Dutch' is wrong!
Name: Oscar
Date: 8/31/2011 12:03:10 AM
Comment:
The term 'Dutch' is wrong! This is a telephone format from The Netherlands, not 'Dutch'! 'Dutch' is NOT a country but a language which is spoken in different countries (with different forms of telephone numbers). As such, please do not use such a regexp if you know you' users speak 'Dutch'. Their phonenumber pattern might be quite different!


Title: Thanks
Name: Massey
Date: 2/19/2009 10:19:59 PM
Comment:
That's exactly what I've been trying to put together for the last hour, great work and thanks a lot :)


Title: This reg contains a bug
Name: John Wheeler
Date: 6/21/2004 6:09:33 AM
Comment:
+31 233------ is matched successfully


Title: RE:
Name: Jon van Leuven
Date: 11/28/2003 4:45:53 AM
Comment:
In our application "+31 233------" was allowed, see also the remark in the description "(which can contain a space or -)."


Title: doesn't work properly
Name: James T. Kirk
Date: 3/31/2003 7:49:49 AM
Comment:
When entering "+31 233------" the expression will be matched, which is obviously incorrect!


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