Regular
Expressions
101
@regex101
Donate
Sponsor
Contact
Bug Reports & Feedback
Wiki
Whats new?
Regex Editor
Regex Library
Account
Regex Quiz
Settings
Live Help
Consider a donation
Become a sponsor
Save & Share
Save Regex
ctrl+s
Go to library entry
Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
Function
Match
Substitution
List
Unit Tests
Tools
Code Generator
Sponsor
Jamstack at Scale
Explanation
"
\(
*
(
\d
{3}
)(?:
(?:

*

\s
*

\.
*

\)
*

\)
\s
*
)
)(
\d
{3}
)(?:
(?:

*

\s
*

\.
*

\)
*
)
)(
\d
{4}
)
"
g
\(
matches the character
(
with index
40
_{10}
(
28
_{16}
or
50
_{8}
) literally (case sensitive)
*
matches the previous token between
zero
and
unlimited
times, as many times as possible, giving back as needed
(greedy)
1st Capturing Group
(
\d
{3}
)
\d
matches a digit (equivalent to
[09]
)
{3}
matches the previous token exactly
3
times
Noncapturing group
(?:
(?:

*

\s
*

\.
*

\)
*

\)
\s
*
)
)
Noncapturing group
(?:

*

\s
*

\.
*

\)
*

\)
\s
*
)
1st Alternative

*

matches the character

with index
45
_{10}
(
2D
_{16}
or
55
_{8}
) literally (case sensitive)
2nd Alternative
\s
*
\s
matches any whitespace character (equivalent to
[\r\n\t\f\v
]
)
*
matches the previous token between
zero
and
unlimited
times, as many times as possible, giving back as needed
(greedy)
3rd Alternative
\.
*
\.
matches the character
.
with index
46
_{10}
(
2E
_{16}
or
56
_{8}
) literally (case sensitive)
*
matches the previous token between
zero
and
unlimited
times, as many times as possible, giving back as needed
(greedy)
4th Alternative
\)
*
\)
matches the character
)
with index
41
_{10}
(
29
_{16}
or
51
_{8}
) literally (case sensitive)
*
matches the previous token between
zero
and
unlimited
times, as many times as possible, giving back as needed
(greedy)
5th Alternative
\)
\s
*
\)
matches the character
)
with index
41
_{10}
(
29
_{16}
or
51
_{8}
) literally (case sensitive)
\s
matches any whitespace character (equivalent to
[\r\n\t\f\v
]
)
*
matches the previous token between
zero
and
unlimited
times, as many times as possible, giving back as needed
(greedy)
2nd Capturing Group
(
\d
{3}
)
\d
matches a digit (equivalent to
[09]
)
{3}
matches the previous token exactly
3
times
Noncapturing group
(?:
(?:

*

\s
*

\.
*

\)
*
)
)
Noncapturing group
(?:

*

\s
*

\.
*

\)
*
)
1st Alternative

*

matches the character

with index
45
_{10}
(
2D
_{16}
or
55
_{8}
) literally (case sensitive)
2nd Alternative
\s
*
\s
matches any whitespace character (equivalent to
[\r\n\t\f\v
]
)
*
matches the previous token between
zero
and
unlimited
times, as many times as possible, giving back as needed
(greedy)
3rd Alternative
\.
*
\.
matches the character
.
with index
46
_{10}
(
2E
_{16}
or
56
_{8}
) literally (case sensitive)
*
matches the previous token between
zero
and
unlimited
times, as many times as possible, giving back as needed
(greedy)
4th Alternative
\)
*
\)
matches the character
)
with index
41
_{10}
(
29
_{16}
or
51
_{8}
) literally (case sensitive)
*
matches the previous token between
zero
and
unlimited
times, as many times as possible, giving back as needed
(greedy)
3rd Capturing Group
(
\d
{4}
)
\d
matches a digit (equivalent to
[09]
)
{4}
matches the previous token exactly
4
times
Global pattern flags
g modifier:
g
lobal. All matches (don't return after first match)
Match Information
Your regular expression does not match the subject string.
Quick Reference
Regular Expression
v1
No Match
r"
"
g
Test String
Regular
Expressions
101
Please wait while the app is loading...
Please enable JavaScript to use this web application.