Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?:(?:\(?(?:00|\+)([1-4]\d\d|[1-9]\d*)\)?)[\-\.\ \\\/]?)?((?:\(?\d{1,}\)?[\-\.\ \\\/]?){0,})(?:[\-\.\ \\\/]?(?:#|ext\.?|extension|x)[\-\.\ \\\/]?(\d+))?$
/
igm
Unit Tests
1-234-567-8901
x1234
→ regex does match
1
(234)
567-8901
→ regex does match
1/234/567/8901
→ regex does match
12345678901
→ regex does match
(0055)(123)8575973
→ regex does match
1-234
567.89/01
ext.1234
→ regex does match
1-234
567.89/01
ext.1234
→ regex does not match
/1/234/567/8901
→ regex does not match
-(0055)(123)8575973
→ regex does not match