Title |
Test
Find
Pattern Title
|
Expression |
^(\(?[0-9]{3}[\)-\.]?\ ?)?[0-9]{3}[-\.]?[0-9]{4}$ |
Description |
Simple US phone number matching, allowing area code or not. Allows spaces, dashes, dots, or none of the above. Area code, if entered, can be surrounded by parenthesis or not. |
Matches |
(555) 555-5555 | 555.555.5555 | 555-5555 |
Non-Matches |
(555)-555-5555 |
Author |
Rating:
Dan Breen
|
Source |
|
Your Rating |
|
Title: Authors Note 2
Name: Dan Breen
Date: 6/3/2004 2:26:02 PM
Comment:
I forgot a space in the original expression...the latest is:
^(\(?[0-9]{3}[\)-\.]?\ ?)?[0-9]{3}[-\.\ ]?[0-9]{4}$