i
Hate
Regex
Library
Cheatsheet
Community
Open playground
match a phone number
Regex title
Edit anything to remix
Remix in playground
JavaScript
Expression
/
Regular expression
^
[\+]
?
[(]
?
[0-9]
{3}
[)]
?
[-\s\.]
?
[0-9]
{3}
[-\s\.]
?
[0-9]
{4,6}
$
^[\+]?[(]?[0-9]{3}[)]?[-\s\.]?[0-9]{3}[-\s\.]?[0-9]{4,6}$
/
gmi
g
i
m
s
u
y
flags
Test bench
Sample text
4 matches
+919367788755
8989829304
+16308520397
786-307-3615
789 123765 1-1-1 +982
+919367788755 8989829304 +16308520397 786-307-3615 789 123765 1-1-1 +982
Structure
Railroad diagram
Interactive
SVG
PNG
Copy
Embed
Live
Strings that match
+919367788755
8989829304
+16308520397
786-307-3615
Strings that don’t match
789
123765
1-1-1
+982
Related patterns
e.164 phone number
matches a valid e.164 format telephobne number
ssn
match a social security number