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 11,580 community submitted regex patterns...
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Improvement on Python Print substitution argument matching
Python
Get the python substitution strings from inside of print statements. Replace the whole substitution string with {{ ArgumentName }} for use in a Jinja2 rendering. Supports fstrings...
Submitted by
Giles Knap
-
5 days ago
2023-09-25 09:20
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Python Print String arg extraction
Python
Extract substitution parameters from python print strings works with fstrings old style format strings old style %(variable) strings
Submitted by
Giles Knap
-
6 days ago
2023-09-24 18:24
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Extract text strings from repeating text fields followed by a suffix
Java 8
This regex expression is useful for extracting only the text string from a value in a column that may contain values from individual rows with repeat strings tagged with a suffix. For example - Row 1: "Sales (#1)", Row 2: "Sales Match (#2)". From the shared examples, this regex will extract the text...
Submitted by
nilotpalc
-
8 days ago
2023-09-22 11:56
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
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
-
11 days ago
2023-09-19 18:20
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
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
-
18 days ago
2023-09-13 00:35
(Last modified 18 days ago)
2023-09-13 00:41
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
CSV
Java 8
Crude CSV regex to split only by characters surrounded by non-whitespace characters. Ignore that it dosen't highlight all of the other commas in the editor. If you select the g regex flag it will properly show here, but not work in Java. Credit to @merosity (Merosity#0135) on Discord!
Submitted by
Merosity, regice202
-
21 days ago
2023-09-09 10:06
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Opportunity Close
PCRE (PHP <7.3)
Prepare batch job for opportunity close
Submitted by
wistlo
-
22 days ago
2023-09-08 17:15
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
HGVS - ClinVar Submission
Python
HGVS Nomenclature Check for ClinVar Submissions
Submitted by
anonymous
-
a month ago
2023-09-04 12:57
(Last modified a month ago)
2023-09-04 12:58
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
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
-
a month ago
2023-09-04 10:51
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
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
-
a month ago
2023-09-04 05:47
(Last modified a month ago)
2023-09-04 05:54
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Match many cases of 8601
Java 8
This is still a working in progress Need to do Unit Tests and search for more use cases Match partial cases of 8601 such as: missing offset missing time...
Submitted by
jpmand
-
a month ago
2023-08-31 11:08
(Last modified a month ago)
2023-08-31 14:32
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Funny Discord Thing
.NET (C#)
Submitted by
Deniz-seckin55
-
a month ago
2023-08-28 15:43
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Discord Message JSON
.NET (C#)
Regex for a Discord Message as JSON Example JSON for Regex: { "id": "1145344233713188874",...
Submitted by
Deniz-seckin55
-
a month ago
2023-08-28 15:32
(Last modified a month ago)
2023-08-28 16:02
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Discord Message JSON
.NET (C#)
Regex for one Discord Message
Submitted by
Deniz-seckin55
-
a month ago
2023-08-28 15:28
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Extract any link or endpoint
Java 8
Extract any link or endpoint from 1- HTML page source 2- HTTP responses 3- JS files Feel free to contact me on Telegram https://t.me/c4ir0 if you:...
Submitted by
Cairo
-
a month ago
2023-08-25 22:32
(Last modified a month ago)
2023-08-27 08:35
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Match emoji in emoji-zwj-sequences.txt
Python
Match emoji in emoji-zwj-sequences.txt
Submitted by
anonymous
-
a month ago
2023-08-18 14:19
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
emoji-test.txt
Python
emoji-test.txt
Submitted by
anonymous
-
a month ago
2023-08-18 12:53
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
html <Title>
Java 8
htnle
Submitted by
erichologist
-
2 months ago
2023-08-09 16:02
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
mikrotik rsc to github
PCRE (PHP <7.3)
convert mikrotik rsc to one line as every rule
Submitted by
sanekmihailow
-
2 months ago
2023-08-06 08:45
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Python regular expression to detect any type of group link and private channel in Telegram
Python
You can use this regular expression to identify any type of Telegram link. It doesn't matter whether it is t.me or telegram.me. Links including "joinchat" are also accepted.
Submitted by
Telegram : T.me/TinyPY
-
2 months ago
2023-07-23 15:57
(Last modified 2 months ago)
2023-07-24 15:49
1
2
3
4
...
579
List of lists of numbers (no leading zeros)
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
Python
r"
^
\[
\s
*
(
\s
*
(
\s
*
\[
\s
*
(
[
1
-
9
]
[
0
-
9
]
*
\s
*
,
\s
*
)*
[
1
-
9
]
[
0
-
9
]
*
\s
*
\]
\s
*
,
\s
*
)*
\[
\s
*
(
[
1
-
9
]
[
0
-
9
]
*
\s
*
,
\s
*
)*
[
1
-
9
]
[
0
-
9
]
*
\s
*
\]
\s
*
)?
\]
$
"
gm
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
4 months ago
2023-05-26 19:56