Displaying page
of
pages;
Items to
Title |
Test
Details
U.S. Phone Number
|
Expression |
1?(?:[.\s-]?[2-9]\d{2}[.\s-]?|\s?\([2-9]\d{2}\)\s?)(?:[1-9]\d{2}[.\s-]?\d{4}\s?(?:\s?([xX]|[eE][xX]|[eE][xX]\.|[eE][xX][tT]|[eE][xX][tT]\.)\s?\d{3,4})?|[a-zA-Z]{7})
|
Description |
More complete than other patterns I could find here. Matches U.S. Phone numbers with various formats. Invalid area codes (that start with a 0 or 1) are excluded, as well as invalid exchanges (that start with 0). Allows, alphabetical exchange+local parts, and many extension notations. Dash and dot delimiters allowed except adjacent to a parenthetical area code. Letters may be used in place of any numbers except the country code and area code.
|
Matches |
8005554444|1 (800) 555-4444 ext. 6666|1-800-NUMBERS
|
Non-Matches |
180033344444|3334444|1110524444
|
Author |
Rating:
Not yet rated.
Trampas Kirk
|
Displaying page
of
pages;
Items to