Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Social
Join the Discord community!
Follow me on twitter!
Send me an email
Donate
Donate
Donate through Paypal
Become a Github Sponsor
Info
Info
Find out what's new!
RegEx101 Wiki
Report bugs or make suggestions
What's new?
Loading content...
Close
Regex Editor
Regex Editor
Community Patterns
Community Patterns
Account
Account
Regex Quiz
Regex Quiz
Settings
Settings
Live Help
Live Help
Get help on Discord
Get help on IRC
Order By
Most Recent
Highest Score
Lowest Score
Most upvotes
Most downvotes
Filter by Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET (C#)
Rust
Sponsors
Community Patterns
Search among 9,420 community submitted regex patterns...
1
4 upvotes, 3 downvotes (score 25%) (You must be signed in to vote)
Table Purgatory
PCRE (PHP <7.3)
A regex to find all nowrap text occurrences and name all the groups involved in preparation for a replacement pass
Submitted by
Joe Hacobian
-
11 years ago
2013-03-28 03:07
4
8 upvotes, 4 downvotes (score 39.1%) (You must be signed in to vote)
Strip out domain extensions except for Microsoft .net technologies.
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
11 years ago
2013-03-25 17:26
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
For Auto RTFs
PCRE (PHP <7.3)
no description available
Submitted by
Dan Bloomquist
-
11 years ago
2013-03-22 03:32
4
15 upvotes, 11 downvotes (score 38.9%) (You must be signed in to vote)
Strip multi-line (star) comments from JavaScript, while leaving any CDATA sections intact.
PCRE (PHP <7.3)
This regular expression removes multi-line (star) comments from JavaScript, while leaving any CDATA sections intact. Use the global (g) modifier to match them all (if you plan to use PHP's preg_replace, the g modifier is not necessary), and use the (s) modifier to make dots match newlines (this will...
Submitted by
Dane MacMillan
-
11 years ago
2013-03-21 20:42
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
MIME type verification
PCRE (PHP <7.3)
See http://tools.ietf.org/html/rfc2045#section-5.1
Submitted by
Erin Millard
-
11 years ago
2013-03-15 01:41
1
7 upvotes, 6 downvotes (score 29.1%) (You must be signed in to vote)
PHP ReflectionParameter:__toString() parser
PCRE (PHP <7.3)
See http://www.php.net/manual/en/reflectionparameter.tostring.php
Submitted by
Erin Millard
-
11 years ago
2013-02-19 09:23
13
35 upvotes, 22 downvotes (score 48.4%) (You must be signed in to vote)
PHP variable name
PCRE (PHP <7.3)
Valid PHP variable name as defined in the manual at http://php.net/manual/en/language.variables.basics.php
Submitted by
Erin Millard
-
11 years ago
2013-02-05 09:18
51
191 upvotes, 140 downvotes (score 52.3%) (You must be signed in to vote)
Disorted Email Addresses
PCRE (PHP <7.3)
Matches distorted email addresses and converts them back to real ones.
Submitted by
dislick
-
11 years ago
2013-01-16 14:11
40
325 upvotes, 285 downvotes (score 49.3%) (You must be signed in to vote)
URL regexp
PCRE (PHP <7.3)
A quite neat regular expression for URLs, e-mails..., I found on Matthew O'Riordan's blog.
Submitted by
Matthew O'Riordan
-
11 years ago
2013-01-14 17:52
1
...
468
469
470
471
PHP ReflectionParameter:__toString() parser
1
7 upvotes, 6 downvotes (score 29.1%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
^
Parameter
#
\d
+
\[
<
(?:
optional
|
required
)
>
(
[
a
-
zA
-
Z_
\x7f-\xff
]
[
a
-
zA
-
Z0
-
9_
\x7f-\xff
]
*
(?:
\\
[
a
-
zA
-
Z_
\x7f-\xff
]
[
a
-
zA
-
Z0
-
9_
\x7f-\xff
]
*
)*
)
(?:
or
NULL
)?
\$
[
a
-
zA
-
Z_
\x7f-\xff
]
[
a
-
zA
-
Z0
-
9_
\x7f-\xff
]
*
(?:
=
NULL
)?
\]
$
/
gm
Open regex in editor
Description
Loading markdown...
Submitted by
Erin Millard
-
11 years ago
2013-02-19 09:23