Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Donate
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Settings
Order By
Most Recent
Most upvotes
Most downvotes
Highest Score
Lowest Score
Filter by Flavor
PCRE2 (PHP >=7.3)
PCRE (PHP <7.3)
ECMAScript (JavaScript)
Python
Golang
Java 8
.NET 7.0 (C#)
Rust
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 18,040 community submitted regex patterns...
7
Remove Widows (PHP)
PCRE (PHP <7.3)
Adds a non-breaking space between the last two words of sentences
Submitted by
herkulano
-
9 years ago
6
Spanish DNI/NIE check fist pass
ECMAScript (JavaScript)
no description available
Submitted by
Rafael Casanova Morera
-
9 years ago
-2
Valid Email
ECMAScript (JavaScript)
Use this Regex for server-side validation also with some slight modifications like so for .NET -- @\w+([-+.']\w+)@\w+([-.]\w+)\.[a-zA-Z0-9]{2,6}(-.{2,6})*;
Submitted by
Fred Scales
-
9 years ago
3
time format HH:mm
ECMAScript (JavaScript)
validates strings in time format HH:mm with hour in 24h format. only accepts up to 23:59
Submitted by
Kelps Leite de Sousa
-
9 years ago
(Last modified a year ago)
4
html tags
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
6
Email
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
2
Regex tutorial Case sensitive consonants
PCRE (PHP <7.3)
With regex you can count the number of matches. Can you make it return the number of uppercase consonants (B,C,D,F,..,X,Y,Z) in a given string? E.g.: it should return 3 with the text ABcDeFO!. Note: Only ASCII. We consider Y to be a consonant! Example: the regex /./g will return 3 when run against t...
Submitted by
anonymous
-
4 years ago
1
PHP ReflectionParameter:__toString() parser
PCRE (PHP <7.3)
See http://www.php.net/manual/en/reflectionparameter.tostring.php
Submitted by
Erin Millard
-
12 years ago
-18
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.
-
12 years ago
(Last modified a year ago)
0
DateTime: DD-MM-YYYY HH:mm:ss
PCRE (PHP <7.3)
Validate and Capture (in 1000-2999 range) Leap-Year Correct
Submitted by
anonymous
-
12 years ago
0
negated special characters
PCRE (PHP <7.3)
no description available
Submitted by
Rimjhim
-
11 years ago
2
sample
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
11 years ago
1
Replace second (or further) html statement in a whole code
ECMAScript (JavaScript)
This regex replace the second tag content which has the prefix ":". If you want to replace the third, just increase the statement {1} to {2}, and so go on.
Submitted by
Caio Oliveira
-
11 years ago
4
Task 1
PCRE (PHP <7.3)
Finds a happy smile, except sad one
Submitted by
Kovalev Evgeny
-
11 years ago
1
Select inside <a> tag
ECMAScript (JavaScript)
no description available
Submitted by
Vinay
-
11 years ago
1
Parse a HTML URL
Python
Break a URL into parts: protocol url path get parameters hash
Submitted by
Dale O'Brien
-
11 years ago
2
trim string
ECMAScript (JavaScript)
trim leading and trailing whitespace from a string
Submitted by
Dave Atchley
-
11 years ago
2
named group sample
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
10 years ago
1
Matching Multiline Strings in Large Text File
PCRE (PHP <7.3)
Need Help, Matching Multiline Strings in Large Text File
Submitted by
jholderman
-
10 years ago
3
php input:date yyyy-mm-dd
PCRE (PHP <7.3)
improved "Ahmed Z" regexp. PHP date format (and input[type=text] format date too): YYYY-MM-DD. Year between [1900-2099]. No leap year check. Month 02 is limited to 29 days.
Submitted by
Oropesa
-
10 years ago
1
...
8
9
10
11
12
...
902
Community Library Entry
0
Regular Expression
ECMAScript (JavaScript)
/
(?:
(?:
rgb
\(
(
\d
{1,3}
)
,
\s
?
(
\d
{1,3}
)
,
\s
?
(
\d
{1,3}
)
\)
)
|
(?:
rgba
\(
(
\d
{1,3}
)
,
\s
?
(
\d
{1,3}
)
,
\s
?
(
\d
{1,3}
)
,
\s
?
(
[
0
-
1
]
\.
0
|
0
\.
[
0
-
9
]
)
\)
)
)
/
gm
Open regex in editor
Description
no description available
Submitted by
anonymous
-
6 years ago