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
r"
\b[(]?(?P<areaCode>\d{3})[)]?[ .-](?P<phone>\d{3}[ .-]\d{4})\b
"
gs
Input 1
1
New
YES (800)-555-1234 212 777.6789 Phone: 800 555-6879. NO 1234567891011 abc def-ghij 800 def.ghij Phone: 1234567891011
Substitution
YES (800)-555-1234 212 777.6789 Phone: 800 555-6879. NO 1234567891011 abc def-ghij 800 def.ghij Phone: 1234567891011