Title |
Test
Find
YA International phone number
|
Expression |
^((\+|00)[1-9]{1,3})?(\-| {0,1})?(([\d]{0,3})(\-| {0,1})?([\d]{5,11})){1}$ |
Description |
International phone number with 6 capturing groups:
international prefix (00 xor '+');
1 to 3 international code number, no zero allowed;
optional space or hyphen;
0 to 3 local prefix number;
optional space or hyphen;
5 to 11 local number without spaces or hyphens; |
Matches |
0034 91 12345678 | +39-2-1234567 | 9112345678 |
Non-Matches |
0034 91 123-456-789 | (91)12345678 | 0034 (91)12345678 |
Author |
Rating:
Not yet rated.
maurizio trezza
|
Source |
|
Your Rating |
|
Title: No zero - can be troublesome
Name: Vlasec
Date: 11/12/2013 8:00:36 PM
Comment:
Well, guess what, international code number of Czech republic is +420. Your code might work for it as well, but only unintentionally.