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,000 community submitted regex patterns...
2
ROM naming scheme
PCRE2 (PHP >=7.3)
this is some cursed shit, but it does work. I use it to check whether all my ROMs have valid names or not. Makes it easier to read and, more importantly, deduplicate.
Submitted by
Riedler
-
7 months ago
(Last modified 2 days ago)
2
RFC822 Date Format
PCRE2 (PHP >=7.3)
Test your RSS pubDate has a correctly formatted date value according to the RFC822 standard It will match timeZoneName (eg GMT, EST) or time zone offset (eg. +0100)
Submitted by
anonymous
-
6 months ago
(Last modified 6 months ago)
2
Journalctl
PCRE2 (PHP >=7.3)
This was build on gentoo with english_ca.utf8 IIRC. Might not work for other distros... or locales supports -as the delimiter of hostname suffixing/prefixing
Submitted by
Wolf1098
-
6 months ago
2
Parse Excel CSV data
PCRE2 (PHP >=7.3)
This is the best regex I found that was able to correctly parse cells containing multiple lines (hard line breaks). Low number of steps with sufficient speed, and it doesn't require /x option either. Source: https://gist.github.com/awwsmm/886ac0ce0cef517ad7092915f708175f
Submitted by
thdoan
-
6 months ago
(Last modified 6 months ago)
2
unicode
PCRE2 (PHP >=7.3)
uncode word boundaries
Submitted by
Mehmet Kozan
-
6 months ago
2
Test 1 solution
PCRE2 (PHP >=7.3)
thanks
Submitted by
Zeeble Dorp
-
6 months ago
2
\tilde \alpha
PCRE2 (PHP >=7.3)
\tilde \alpha
Submitted by
anonymous
-
5 months ago
2
tst
PCRE2 (PHP >=7.3)
test
Submitted by
anonymous
-
4 months ago
2
Command line parser
.NET 7.0 (C#)
Supports parameters such as keys and values, also parameters enclosed in quotes.
Submitted by
Pavel Bashkardin
-
3 months ago
(Last modified 3 months ago)
2
GitHub URL Parser
ECMAScript (JavaScript)
A regular expression for extracting the author, repository name, and optional branch from a GitHub repository or tree URL. Handles both HTTP(S) and direct GitHub links.
Submitted by
Xain
-
2 months ago
2
Quiz_1
PCRE2 (PHP >=7.3)
Check if a string contains the word word in it (case insensitive). If you have no idea, I guess you could try /word/.
Submitted by
anonymous
-
a month ago
2
Quiz_17_Start_before_end
PCRE2 (PHP >=7.3)
Only match lines with the text start, unless text end appears prior to start. Note: end may or may not be in the string. Match start line_end; and don't match line_end; start
Submitted by
anonymous
-
a month ago
2
Quiz_16_Repeated_Words
PCRE2 (PHP >=7.3)
I'd like to know if a text contains words with 4 characters or more which are repeated 3 or more times in the text (anywhere in the text). If so, set one (and only one) backreference for each word.
Submitted by
anonymous
-
a month ago
2
Quiz_15_Not_surrounded_by_digits
PCRE2 (PHP >=7.3)
Replace every . (dot) with a - (hyphen) except when the dot is surrounded by digits. E.g.: .a.b.1.2. should become -a-b-1.2-
Submitted by
anonymous
-
a month ago
2
Quiz_14_Spam_filter
PCRE2 (PHP >=7.3)
Match a string that contains any of the following substrings: http://, www., porn, or credit card. But don't match the text if it contains one of: not allowed, filter, or mirc. Don't use word boundaries (anywhere in the text is fine). If you need help, try reading this.
Submitted by
anonymous
-
a month ago
2
Quiz_13_Match_Alternating_0s_And_1s_In_Any_Order
PCRE2 (PHP >=7.3)
I'm trying to match bit sequences which are alternating between 1 and 0 and never have more than one 1 or 0 in a row. They can be single digits. Try matching this: 0101010, 1010101010 or 1
Submitted by
anonymous
-
a month ago
2
Quiz_12_Match_Any_Number_Between_0-100
PCRE2 (PHP >=7.3)
Could you help me validate my input and only match positive integers between the range of 0 and 100? There can be several numbers in a string which I would want to retrieve. Try out these example strings: ...
Submitted by
anonymous
-
a month ago
3
Match quoted strings, ignoring escaped quotes
PCRE (PHP <7.3)
Matches single or double quoted strings, and ignores backslash-escaped quotes within the string.
Submitted by
Maddingue
-
11 years ago
3
SQL select columns
PCRE (PHP <7.3)
no description available
Submitted by
Phan
-
11 years ago
3
Get Nth value (3 times)
PCRE (PHP <7.3)
capture Nth character from string, 3 times
Submitted by
K.
-
11 years ago
1
...
879
880
881
882
883
...
900
Community Library Entry
0
Regular Expression
ECMAScript (JavaScript)
/
^
hsla
?
\(
\s
*
(?<h>
[
-+
]
?
\d
{1,3}
(?:
\.
\d
+
)?
)
(
deg
|
grad
|
rad
|
turn
)?
\s
*
(?:
,
\s
*
|
\s
+
)
\s
*
(?<s>
[
-+
]
?
\d
{1,3}
(?:
\.
\d
+
)?
)
%
\s
*
(?:
,
\s
*
|
\s
+
)
\s
*
(?<l>
[
-+
]
?
\d
{1,3}
(?:
\.
\d
+
)?
)
%
\s
*
(?:
,
\s
*
|
\s
+
)?
(?:
\s
*
\/
?
\s
*
(?<alpha>
[
-+
]
?
[
\d
.
]
+
%
?
)
\s
*
)?
\)
$
/
gmi
Open regex in editor
Description
matches many HSL and HSLA formats permitted in CSS
Submitted by
anonymous
-
2 years ago