Title |
Test
Find
Pattern Title
|
Expression |
^[+][0-9]\d{2}-\d{3}-\d{4}$ |
Description |
This is a basic telephone number vaildation which needs a compulsory prefix of a '+' sign with three digits and followed by a hipen, another three digits and finally followed by another hipen and four more digits.
Regards,
Senthil Gunabalan |
Matches |
+974-584-5656 | +000-000-0000 | +323-343-3453 |
Non-Matches |
974-584-5656 | +974 000 0000 |
Author |
Rating:
Not yet rated.
Senthil Gunabalan
|
Source |
|
Your Rating |
|
Title: What's the point?
Name: Vlad I
Date: 6/15/2004 4:00:07 PM
Comment:
If you're going to allow bad data (+000-000-0000) they why bother to validate at all?
Title: US phone numbers?
Name: John K
Date: 5/24/2004 7:11:17 AM
Comment:
I presume this is for US phone numbers only. That should be stated in the description.
(Also, "hiphen" is spelled "hyphen").
Good job on the regex!