Regular
Expressions
101
@regex101
Follow me on twitter!
Donate
Like regex101? Support it by donating!
Sponsor
Become a sponsor!
Contact
Send me an email
Bug Reports & Feedback
Bugs or suggestions go here
Wiki
Wiki (Info & FAQ)
Whats new?
Whats new?
Regex Editor
Regex Editor
Regex Library
Regex Library
Account
Account
Regex Quiz
Regex Quiz
Settings
Settings
Live Help
Live Help
Consider a donation
Consider a donation
Become a sponsor
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 2.7
Golang
Java 8
Function
Match
Substitution
List
Unit Tests
Tools
Code Generator
Sponsor
Jamstack at Scale
Explanation
/
^
(
[^
\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff
]
|
\x22
(
[^
\x0d\x22\x5c\x80-\xff
]
|
\x5c
[
\x00-\x7f
]
)*
\x22
)(
\x2e
(
[^
\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff
]
|
\x22
(
[^
\x0d\x22\x5c\x80-\xff
]
|
\x5c
[
\x00-\x7f
]
)*
\x22
)
)*
\x40
(
[^
\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff
]
|
\x5b
(
[^
\x0d\x5b-\x5d\x80-\xff
]
|
\x5c
[
\x00-\x7f
]
)*
\x5d
)(
\x2e
(
[^
\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff
]
|
\x5b
(
[^
\x0d\x5b-\x5d\x80-\xff
]
|
\x5c
[
\x00-\x7f
]
)*
\x5d
)
)*
$
/
^
asserts position at start of the string
1st Capturing Group
(
[^
\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff
]
|
\x22
(
[^
\x0d\x22\x5c\x80-\xff
]
|
\x5c
[
\x00-\x7f
]
)*
\x22
)
1st Alternative
[^
\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff
]
Match a single character not present in the list below
[^
\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff
]
+
matches the previous token between
one
and
unlimited
times, as many times as possible, giving back as needed
(greedy)
\x00-\x20
matches a single character in the range between