/ Published in: Regular Expression
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
^((1|+1)?( |-|.)?)?((?[0-9]{3})?|[0-9]{3})( |-|.)?([a-zA-Z0-9]{3}( |-|.)?[a-zA-Z0-9]{4})[ ]*(( |x|ext|ext.|extension|Ext|Ext.|Extension|#){1}[ ]?([0-9]){1,7}){0,1}$ matched (223)456 7891 x 123 (223)456 7891 ext 123 (223)456 7891 ext. 123 (223)456 7891 Ext 123 (223)456 7891 Ext. 123 (910)456-8970 x12 (910)456-8970 #12 (910)456-8970 extension12456 (910)456-8970 Extension 12456 234.445.6789 987 765-8765 1 (453) 876 9876 +1 (453) 876 9876 (800)ABCDEFG (800) ABC-1234 not matched 2 (453) 876 9876 (4534) 876 9876 (453) 8764 9876 (453) 876 98769