Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Community Library
How to contribute
x
Phone Number
Open Workspace
JavaScript
Match
Created 2016-04-26 13:56
1
Regular Expression
/
^
\(
\d
{3}
\)
\s
?
\d
{3}
\-
\d
{4}
$
/
m
Description
Allows a phone number in the following format: (123) 123-1234 The space is optional
Submitted by
Tom G.