Title |
Test
Find
Pattern Title
|
Expression |
^\([0-9]{3}\)\s?[0-9]{3}(-|\s)?[0-9]{4}$|^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$ |
Description |
US telephone check |
Matches |
1231231234 | (123)123-1234 | 123-123-1234 |
Non-Matches |
12312312345 | (123)-123-1234 | 123 |
Author |
Rating:
Not yet rated.
PJ Bijoy
|
Source |
|
Your Rating |
|
Title: not working
Name: xxx
Date: 1/5/2009 8:24:24 AM
Comment:
above given regular expression is not working
this allow (123)1234567 this number ?
Title: US telephone
Name: PJ Bijoy
Date: 7/1/2004 5:04:32 PM
Comment:
Update to the script because it is not working in some java scrip environment
^[(][0-9]{3}[)][ ]?[0-9]{3}(-|[ ])?[0-9]{4}$|^[0-9]{3}-[0-9]{3}-[0-9]{4}$|^[0-9]{3}[ ][0-9]{3}[ ][0-9]{4}$|^[0-9]{3}[0-9]{3}[0-9]{4}$