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...
5
9 upvotes, 4 downvotes (score 42.4%) (You must be signed in to vote)
Repair unquoted HTML attribute values
PCRE (PHP <7.3)
Usually MSWord HTML exports
Submitted by
Ka.
-
10 years ago
2013-06-21 16:45
8
23 upvotes, 15 downvotes (score 44.7%) (You must be signed in to vote)
Validate Base64 single-line string
PCRE (PHP <7.3)
no description available
Submitted by
ka.
-
10 years ago
2013-05-31 00:35
18
310 upvotes, 292 downvotes (score 52.3%) (You must be signed in to vote)
Date: DD-MM-YYYY hh:mm:ss
Recommended
This entry has been specifically selected by our team to be a great submission
PCRE (PHP <7.3)
Validate and capture dateTime parts, includes validation for leap years, range 1000-2999. Fixed bug
Submitted by
Ka.
-
11 years ago
2013-05-17 13:07
0
7 upvotes, 7 downvotes (score 26.8%) (You must be signed in to vote)
DateTime: DD-MM-YYYY HH:mm:ss
PCRE (PHP <7.3)
Validate and Capture (in 1000-2999 range) Leap-Year Correct
Submitted by
anonymous
-
11 years ago
2013-05-13 23:26
-18
6 upvotes, 24 downvotes (score 9.5%) (You must be signed in to vote)
dd-mm-YYYY HH:mm:ss (year range 1000-2999)
PCRE (PHP <7.3)
Validate Gregorian calendar dates that contain 24-hour times. This will also correctly match the Feb 29 date when it falls on a valid leap year. Leap years occur every 4 years, with one exception: when a year is evenly divisible by 100 but not evenly divisible by 400, the year will not be a leap ye...
Submitted by
Ka.
-
11 years ago
2013-05-13 22:48
(Last modified 4 months ago)
2023-07-24 16:28
2
3 upvotes, 1 downvotes (score 30.1%) (You must be signed in to vote)
js function test
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
11 years ago
2013-04-09 03:26
4
5 upvotes, 1 downvotes (score 43.6%) (You must be signed in to vote)
1st TSV
PCRE (PHP <7.3)
no description available
Submitted by
DynV
-
11 years ago
2013-04-08 22:00
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
dropping first digit (2) andy advice?
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
\_
\d
(
.
+
)
/
Open regex in editor
Description
Loading markdown...
Submitted by
jbt
-
9 years ago
2015-05-28 16:43