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,220 community submitted regex patterns...
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
-
5 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
-
12 days ago
2023-09-13 00:35
(Last modified 12 days ago)
2023-09-13 00:41
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
-
16 days ago
2023-09-08 17:15
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
-
21 days 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
-
21 days ago
2023-09-04 05:47
(Last modified 21 days ago)
2023-09-04 05:54
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
-1
0 upvotes, 1 downvotes (score 0%) (You must be signed in to vote)
pesquisa_cautelar
PCRE (PHP <7.3)
Array ( [0] => Página 1 de 5 MEGA [1] => Código da Consulta: 15240795 [2] => MEGA15240795VIS\bKdKd>Z/Z\bOPRETOAGJ3548,SP,MEGA15240795VIS\bKdKd>Z/Z\bOPRETOAGJ3548,SP,MEGA15240795VIS\bKdKd>Z/Z\bOPRETOAGJ3548,SP,MEGA15240795VIS\bKdKd>Z/Z\bOPRETOAGJ3548,SP,MEGA15240795VIS\bKdKd...
Submitted by
emerson
-
2 months ago
2023-07-14 19:37
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Additional
PCRE (PHP <7.3)
Splitting Additionalname in Basename and Specification
Submitted by
JK
-
2 months ago
2023-07-13 07:57
(Last modified 2 months ago)
2023-07-19 09:43
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Tracking Number Recognition and Parsing
PCRE (PHP <7.3)
T
Submitted by
anonymous
-
2 months ago
2023-07-12 16:54
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
whois
PCRE (PHP <7.3)
whois find param
Submitted by
anonymous
-
3 months ago
2023-07-06 15:38
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
jiggl
PCRE (PHP <7.3)
toggl track to jira
Submitted by
anonymous
-
4 months ago
2023-06-07 10:53
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
string substitution in bash behaving differently from PCRE(PHP<7.3>
PCRE (PHP <7.3)
question about bash not returning expected results, the same result as this saved regex returns here
Submitted by
anonymous
-
4 months ago
2023-05-27 12:58
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
strip host port
PCRE (PHP <7.3)
removes port number from URL
Submitted by
pc
-
4 months ago
2023-05-26 15:55
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Proxy Matcher
PCRE (PHP <7.3)
Validate 1-223.0-255.0-255.0-255:1-65535
Submitted by
dev.tntd2k2
-
4 months ago
2023-05-23 13:54
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
latlonlatlon
PCRE (PHP <7.3)
gg
Submitted by
anonymous
-
4 months ago
2023-05-22 19:12
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
ENEL T5 Mono
PCRE (PHP <7.3)
T
Submitted by
anonymous
-
4 months ago
2023-05-11 13:35
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
all instagram regex
PCRE (PHP <7.3)
(?:https?:\/\/)?(?:www.)?instagram.com\/?([a-zA-Z0-9\.\\-]+)?\/([p]+)?([reel]+)?([tv]+)?([stories]+)?\/([a-zA-Z0-9\-\\.]+)\/?([0-9]+)?
Submitted by
threedot
-
5 months ago
2023-05-09 10:41
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
domain name with subdomains
PCRE (PHP <7.3)
should match any domain with one or more subdomains
Submitted by
Igor Tiulkanov
-
5 months ago
2023-05-05 14:09
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Example 1.1: Pet Name
PCRE (PHP <7.3)
Example used in slide 39
Submitted by
anonymous
-
5 months ago
2023-04-27 04:38
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
i++ in bash
PCRE (PHP <7.3)
asdf
Submitted by
anonymous
-
5 months ago
2023-04-22 07:33
1
2
3
4
...
461
determine if input text is an URL
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
PCRE2 (PHP >=7.3)
/
(
(
https
?
:
)?
\/\/
)?
(
(
[
\d\w
]
|
%
[
a
-
fA
-
f
\d
]
{2,2}
)+
(
:
(
[
\d\w
]
|
%
[
a
-
fA
-
f
\d
]
{2,2}
)+
)?
@
)?
(
[
\d\w
]
[
-
\d\w
]
{0,253}
[
\d\w
]
\.
)+
[
\w
]
{2,63}
(
:
[
\d
]
+
)?
(
\/
(
[
-+_~.
\d\w
]
|
%
[
a
-
fA
-
f
\d
]
{2,2}
)*
)*
(
\?
(
&
?
(
[
-+_~.
\d\w
]
|
%
[
a
-
fA
-
f
\d
]
{2,2}
)
=
?
)*
)?
(
#
(
[
-+_~.
\d\w
]
|
%
[
a
-
fA
-
f
\d
]
{2,2}
)*
)?
/
gmi
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
6 months ago
2023-03-20 14:46