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
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 7.0 (C#)
Rust
Sponsors
Community Patterns
Search among 9,420 community submitted regex patterns...
1
"fake" markdown link detection
Rust
This regex catches markdown links where the display text is also a link, like this: \example.com in order to prevent people getting tricked and clicking on a link that isn't what it says it is. See the test string for a much longer explanation with examples.
Submitted by
Osh
-
6 days ago
(Last modified 5 days ago)
1
Renamer Log file to CSV
PCRE (PHP <7.3)
Catches our log files renamed file names and adds them to CSV file
Submitted by
anonymous
-
18 days ago
1
Detect Multiple File Extensions
PCRE (PHP <7.3)
I use this to find files with two or more extensions (i.e. file.txt.txt). This will work with files with 3 or 4 character or numeric (or both) file extensions (i.e. pdf, xlsx).
Submitted by
Curve
-
2 months ago
(Last modified 2 months ago)
1
Chinese Digits
PCRE (PHP <7.3)
Match Chinese Digits less than 1×10^16, such as “一千两百三十四万”、“八萬点七六五”、“玖仟玖佰玖拾玖万玖仟玖佰玖拾玖亿玖仟玖佰玖拾玖万玖仟玖佰玖拾玖点玖玖玖玖玖玖玖玖玖玖玖玖玖玖玖玖”,Upper and lower case Chinese can be mixed, but Chinese numbers and English numbers cannot be mixed. Illegal numbers will not be matched. For example: “两十六” will not be matched, as t...
Submitted by
anonymous
-
4 months ago
(Last modified 3 months ago)
1
NPC名称匹配
PCRE (PHP <7.3)
^\h{4}段首4个横向空格 +不包含左括号、换行符号的其他字符,1~无限循环 \((.*)\)$捕获处于()之中的任意字符内容,右括号在段尾
Submitted by
vicrly
-
4 months ago
1
Discord Anti-Advertisement 2
Rust
Pair this with my Discord AutoMod Anti Advertisement for full protection against invites. Use this with Discord's Built In AutoMod.
Submitted by
dogknife
-
4 months ago
(Last modified 3 months ago)
1
Discord Anti Advertisement
Rust
Discord AutoMod Regex Use this Regex with Discord's built-in automod to prevent all invite URLs. This will block discord.gg/ad but not .gg/ad Consider seeing my "strict" version otherwise.
Submitted by
dogknife
-
4 months ago
(Last modified 3 months ago)
1
Discord AutoMod Advert (Strict)
Rust
Use this with Discord automod. Bear in mind, this is "Strict" because it will block discord.gg/myad AND other links such as dsc.gg/myad
Submitted by
dogknife
-
4 months ago
(Last modified 3 months ago)
1
77870294
PCRE (PHP <7.3)
618001/041881 564094
Submitted by
960203095053
-
6 months ago
(Last modified 6 months ago)
1
Rust type-like ident casing
Rust
Matches built-in primitives and identifiers with casing conventionally used for type/constant names.
Submitted by
Neel Yadav
-
6 months ago
1
Kafka loki parser
Golang
Kafka loki parser
Submitted by
anonymous
-
6 months ago
1
Rust Phone Number
Rust
not fully featured, but simple.
Submitted by
Jakersnell
-
6 months ago
1
groupping math every 2 comma separator
PCRE (PHP <7.3)
i have paste \n after every 2-th comma using sed sed 's/\(\(*,\)\{2\}\)/\1\n/g'
Submitted by
sanekmihailow
-
7 months ago
1
Remove specific parameter from URL
PCRE (PHP <7.3)
This pattern finds a parameter (sst) key + value in a GET request URL. When replaced with an empty string, effectively removes the parameter. Works with both full URLs and isolated query strings. Works in PCRE and PCRE2. Full use case: if (isset($_GET["sst"])) { // validate...
Submitted by
Martin Holt
-
8 months ago
(Last modified 8 months ago)
1
Opportunity Close
PCRE (PHP <7.3)
Prepare batch job for opportunity close
Submitted by
wistlo
-
8 months ago
1
Adds custom prefix to tailwind classes
PCRE (PHP <7.3)
Or any other particular case where given any line that starts with the pattern "@apply" (or any other line heading) and it substitutes any word (list of characters without spaces), with or without puntuation in them, and it adds a custom prefix to all the words in that line but the line heading.
Submitted by
@drakopablo.dev
-
8 months ago
2
Invalid Windows Filename Chars
PCRE (PHP <7.3)
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file Integer value zero, sometimes referred to as the ASCII NUL character. Characters whose integer representations are in the range from 1 through 31, except for alternate data streams where these characters are allowed. For more info...
Submitted by
anonymous
-
8 months ago
(Last modified 8 months ago)
1
0x28C6A6DdF8fF8A47A90A69bfE75cd89904a14d71
Golang
0x28C6A6DdF8fF8A47A90A69bfE75cd89904a14d71
Submitted by
anonymous
-
8 months ago
2
Mikrotik firewall logs
Golang
Matching for mikrotik ROS 7 Used in promtail and grafana
Submitted by
anonymous
-
9 months ago
(Last modified 9 months ago)
1
mikrotik rsc to github
PCRE (PHP <7.3)
convert mikrotik rsc to one line as every rule
Submitted by
sanekmihailow
-
9 months ago
1
2
3
...
471
Library of Congress Call Numbers
0
Regular Expression
PCRE2 (PHP >=7.3)
/
^
[
A
-
Z
]
{1,3}
[
0
-
9
]
{1,4}
\.
?
(
[
0
-
9
]
{1,2}
)?
\
?
\.
?
[
A
-
Z
]
{1}
[
0
-
9
]
{1,}
.
?
\
?
(
[
A
-
Z
]
{1,2}
[
1
-
9
]
{1,}
)?
\
?
(
[
0
-
9
]
{1,}
)?
/
gm
Open regex in editor
Description
Matches Library of Congress Call Number
Submitted by
Andy F
-
2 years ago