Regular
Expressions
101
Please wait while the app is loading...
Please enable JavaScript to use this web application.
Regular
Expressions
101
@regex101
Donate
Sponsor
Contact
Bug Reports & Feedback
Wiki
What's new?
What's new?
Loading content...
Close
Regex Editor
Regex Editor
Regex Library
Regex Library
Account
Account
Regex Quiz
Regex Quiz
Settings
Settings
Live Help
Live Help
Order By
Most Recent
Most Points
Fewest Points
Filter by Flavor
PCRE2
PCRE
ECMAScript
Python
Golang
Java
.NET
Sponsors
All your environment variables, in one place
Library entries
Search library
-2
10 upvotes, 12 downvotes (45% like it) (You must be signed in to vote)
pcre
Remove empty HTML tags
Removes empty HTML tags. Was needed for old input clean-up and to keep a HTML parses from crashing. Looking for improvement on bottom test.
Submitted by
R. Sartorius
-
9 years ago
-2
1 upvotes, 3 downvotes (25% like it) (You must be signed in to vote)
pcre
Ukazka
no description available
Submitted by
anonymous
-
9 years ago
-2
1 upvotes, 3 downvotes (25% like it) (You must be signed in to vote)
pcre
failed attempt
no description available
Submitted by
DynV
-
9 years ago
-2
1 upvotes, 3 downvotes (25% like it) (You must be signed in to vote)
pcre
A masz!
no description available
Submitted by
Ja
-
9 years ago
-2
1 upvotes, 3 downvotes (25% like it) (You must be signed in to vote)
pcre
[A-Z]+[a-z]{1,2}[0-9]*
no description available
Submitted by
anonymous
-
9 years ago
-2
4 upvotes, 6 downvotes (40% like it) (You must be signed in to vote)
pcre
Match v4 IP address
no description available
Submitted by
Budiony Damyanov
-
9 years ago
-2
2 upvotes, 4 downvotes (33% like it) (You must be signed in to vote)
javascript
Select ID from regex101 URL
no description available
Submitted by
Vinay
-
9 years ago
-2
1 upvotes, 3 downvotes (25% like it) (You must be signed in to vote)
pcre
Why doesn't it stop at the period?
try to match just the name from this: Copyright © 2005 Candy Arrington. Used by permission. All rights reserved.
Submitted by
anonymous
-
9 years ago
-2
1 upvotes, 3 downvotes (25% like it) (You must be signed in to vote)
pcre
Regular expression for both IPv6 and IPv4 URL
no description available
Submitted by
Henry Li
-
9 years ago
-2
2 upvotes, 4 downvotes (33% like it) (You must be signed in to vote)
pcre
test
no description available
Submitted by
anonymous
-
9 years ago
-2
1 upvotes, 3 downvotes (25% like it) (You must be signed in to vote)
pcre
IP 3 words and a number
Matches an Ip and any 3 words and a number after separated by any number of spacing characters.
Submitted by
Attalward
-
9 years ago
-2
1 upvotes, 3 downvotes (25% like it) (You must be signed in to vote)
pcre
Unicode email sanitising
no description available
Submitted by
anonymous
-
9 years ago
-2
3 upvotes, 5 downvotes (38% like it) (You must be signed in to vote)
pcre
French phone number
no description available
Submitted by
Benoit Anastay
-
9 years ago
-2
2 upvotes, 4 downvotes (33% like it) (You must be signed in to vote)
pcre
1_aa3
no description available
Submitted by
anonymous
-
9 years ago
-2
4 upvotes, 6 downvotes (40% like it) (You must be signed in to vote)
pcre
Sample
no description available
Submitted by
anonymous
-
9 years ago
-2
3 upvotes, 5 downvotes (38% like it) (You must be signed in to vote)
javascript
Regex to select text withing square brackets.
no description available
Submitted by
Dhrubajyoti Gogoi
-
9 years ago
-2
2 upvotes, 4 downvotes (33% like it) (You must be signed in to vote)
pcre
Find multiple XML documents in file
as title says
Submitted by
Doro
-
9 years ago
-2
2 upvotes, 4 downvotes (33% like it) (You must be signed in to vote)
pcre
indonesian p0rn word filter
find and replace bad and p0rn indonesian words
Submitted by
teknokoplak
-
9 years ago
-2
0 upvotes, 2 downvotes (0% like it) (You must be signed in to vote)
javascript
Header `Link` validator
no description available
Submitted by
Vaseker
-
9 years ago
-2
1 upvotes, 3 downvotes (25% like it) (You must be signed in to vote)
pcre
Date YYYYMMDD
Date in format YYYYMMDD Year between [1900-2099] No leap year check but month 02 is limited to 29 days.
Submitted by
Ahmed Z
-
9 years ago
1
...
728
729
730
731
732
733
734
...
741
Matching email addresses per RFC5322
Vote
234
715 upvotes, 481 downvotes (60% like it) (You must be signed in to vote)
Regular Expression
pcre
/
(?(DEFINE)
(?<addr_spec>
(?&local_part)
@
(?&domain)
)
(?<local_part>
(?&dot_atom)
|
(?"ed_string)
|
(?&obs_local_part)
)
(?<domain>
(?&dot_atom)
|
(?&domain_literal)
|
(?&obs_domain)
)
(?<domain_literal>
(?&CFWS)
?
\[
(?:
(?&FWS)
?
(?&dtext)
)*
(?&FWS)
?
\]
(?&CFWS)
?
)
(?<dtext>
[
\x21-\x5a
]
|
[
\x5e-\x7e
]
|
(?&obs_dtext)
)
(?<quoted_pair>
\\
(?:
(?&VCHAR)
|
(?&WSP)
)
|
(?&obs_qp)
)
(?<dot_atom>
(?&CFWS)
?
(?&dot_atom_text)
(?&CFWS)
?
)
(?<dot_atom_text>
(?&atext)
(?:
\.
(?&atext)
)*
)
(?<atext>
[
a
-
zA
-
Z0
-
9!#$%&'*+
\/
=?^_`{|}~-
]
+
)
(?<atom>
(?&CFWS)
?
(?&atext)
(?&CFWS)
?
)
(?<word>
(?&atom)
|
(?"ed_string)
)
(?<quoted_string>
(?&CFWS)
?
"
(?:
(?&FWS)
?
(?&qcontent)
)*
(?&FWS)
?
"
(?&CFWS)
?
)
(?<qcontent>
(?&qtext)
|
(?"ed_pair)
)
(?<qtext>
\x21
|
[
\x23-\x5b
]
|
[
\x5d-\x7e
]
|
(?&obs_qtext)
)
#
comments
and
whitespace
(?<FWS>
(?:
(?&WSP)
*
\r\n
)?
(?&WSP)
+
|
(?&obs_FWS)
)
(?<CFWS>
(?:
(?&FWS)
?
(?&comment)
)+
(?&FWS)
?
|
(?&FWS)
)
(?<comment>
\(
(?:
(?&FWS)
?
(?&ccontent)
)*
(?&FWS)
?
\)
)
(?<ccontent>
(?&ctext)
|
(?"ed_pair)
|
(?&comment)
)
(?<ctext>
[
\x21-\x27
]
|
[
\x2a-\x5b
]
|
[
\x5d-\x7e
]
|
(?&obs_ctext)
)
#
obsolete
tokens
(?<obs_domain>
(?&atom)
(?:
\.
(?&atom)
)*
)
(?<obs_local_part>
(?&word)
(?:
\.
(?&word)
)*
)
(?<obs_dtext>
(?&obs_NO_WS_CTL)
|
(?"ed_pair)
)
(?<obs_qp>
\\
(?:
\x00
|
(?&obs_NO_WS_CTL)
|
\n
|
\r
)
)
(?<obs_FWS>
(?&WSP)
+
(?:
\r\n
(?&WSP)
+
)*
)
(?<obs_ctext>
(?&obs_NO_WS_CTL)
)
(?<obs_qtext>
(?&obs_NO_WS_CTL)
)
(?<obs_NO_WS_CTL>
[
\x01-\x08
]
|
\x0b
|
\x0c
|
[
\x0e-\x1f
]
|
\x7f
)
#
character
class
definitions
(?<VCHAR>
[
\x21-\x7E
]
)
(?<WSP>
[
\t
]
)
)
^
(?&addr_spec)
$
/
xmg
Open regex in editor
Description
Loading markdown...
Submitted by
Michael Musson
- 10 years ago