Displaying page
of
pages;
Items to
Title |
Test
Details
US Phone Number[ANY format]
|
Expression |
^\D{0,2}[0]{0,3}[1]{0,1}\D{0,2}([2-9])(\d{2})\D{0,2}(\d{3})\D{0,2}(\d{3})\D{0,2}(\d{1})\D{0,2}$
|
Description |
Very useful if you want to use ANY-NON-DIGIT as delimiter and return proper US-Phone-Number. Use "($1) $2-$3$4" to get Number in form: "(234) 567-8901".
Will ignore starting 1, 01, 001, +1 etc.
Validates and also captures AreaCode, Prefix and Suffix for reformatting.
In all matching examples, it will return the same result. I have not found any exception yet.
|
Matches |
(234) 567-8901 | +1-234-567-890-1 | +001 2345678901 | +1/234/567/890-1 | 0012345678901 | X234X567X890X1X | (+001)(234)(5678901) | +1(234)5678901 | +1 234 567 890-1 | [234][567][890(1)] | 234/567/890/1 | 12345678901
|
Non-Matches |
12X345678901 | 23456789X01 | 5678901
|
Author |
Rating:
Not yet rated.
Waqas Mehmood
|
Displaying page
of
pages;
Items to