Title |
Test
Find
Pattern Title
|
Expression |
^(([+]31|0031)\s\(0\)([0-9]{9})|([+]31|0031)\s0([0-9]{9})|0([0-9]{9}))$ |
Description |
Expression to check Dutch phone numbers. Number must start with zero and number of digits should be 10. Different area and country codes are allowed. |
Matches |
+31 0205315386 | 0031 (0)205315386 | 0205315386 |
Non-Matches |
020531538 | 1205315386 | 020531538677 |
Author |
Rating:
Mathieu van der Linden
|
Source |
|
Your Rating |
|
Title: Inefficient pattern.
Name: g1smd
Date: 8/5/2012 1:30:27 PM
Comment:
Once you've found the start, don't keep searching for it again. Common elements should only be specified once. The above pattern simplifies to ^((00\s?|+)31\s(\(?0\)?\s?)?|0)[0-9]{9}$ and parses VERY much faster.
Title: The term 'Dutch' is wrong!
Name: Oscar
Date: 8/31/2011 12:27:13 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 your users speak 'Dutch'. Their phonenumber pattern might be quite different!
Title: Subscriber number starts with zero?
Name: Bert Zandbergen
Date: 1/26/2007 4:25:16 AM
Comment:
In addition to the former comment it should be impossible to have the subscriber number starting with a zero. The second number of the area code cannot be a zero.
The european service numbers are not taken in consideration at all. They start with 0800, 0900, 0906 or 0909, followed by the optional dash and a service number of minimal 4 digits.
Title: Missing dash
Name: Bert Zandbergen
Date: 1/26/2007 4:15:11 AM
Comment:
The optional dash is not supported here. Phone number are oftenly written with a dash (-) between the area code and the subscriber number. The area code can consist of 2-4 digits, including the leading zero. The remainder of the complete number of ten digits is the subscriber number.