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
/
^(\+?\d{0,2})?[\D]?\(?(\d{3})\)?[\D]?(\d{3})[\D]?(\d{4})$
/
gm
Input 1
(000) 000 0000 (000) 000-0000 (000)000 0000 (000)000-0000 (000)0000000 +0 (000) 000-0000 +0 000 000 0000 +0 000-000-0000 +0-000-000-0000 +00 (000) 000-0000 +00 000 0000000 +00 0000000000 +0000000000 +000000000000 0 (000) 000-0000 0 (000)-000-0000 0 0000000000 0-000-000-0000 000 000 0000 000 000-0000 000-000 0000 000-000-0000 000-0000000 000.000.0000 000000-0000 0000000000
Substitution
$1 $2-$3-$4
(000) 000 0000 (000) 000-0000 (000)000 0000 (000)000-0000 (000)0000000 +0 (000) 000-0000 +0 000 000 0000 +0 000-000-0000 +0-000-000-0000 +00 (000) 000-0000 +00 000 0000000 +00 0000000000 +0000000000 +000000000000 0 (000) 000-0000 0 (000)-000-0000 0 0000000000 0-000-000-0000 000 000 0000 000 000-0000 000-000 0000 000-000-0000 000-0000000 000.000.0000 000000-0000 0000000000