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 12,980 community submitted regex patterns...
10
13 upvotes, 3 downvotes (score 57%) (You must be signed in to vote)
MikroTik FireWall
PCRE (PHP <7.3)
Regex used in Splunk to extract fields from Mikrotik FW. NOTES: Mikrotik must be configured to use "BSD Syslog" format FW rules must add, as log prefix, the action: drop accep...
Submitted by
HappyIdeasMaker
-
8 years ago
2015-05-30 10:27
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
File name
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-05-29 22:51
-2
1 upvotes, 3 downvotes (score 4.6%) (You must be signed in to vote)
Any telephone number with region and country in any format
ECMAScript (JavaScript)
Matches any telephone number with region parentesis, or separated by points or dash or spaces
Submitted by
https://co.linkedin.com/in/andresfelipecardona
-
8 years ago
2015-05-29 20:12
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
guto
PCRE (PHP <7.3)
gutoregex
Submitted by
guto
-
8 years ago
2015-05-29 14:13
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
[php] url hard match
PCRE (PHP <7.3)
preg_math_all only. ex.: http://doman.com, http://doman.com/, http://doman.com/?query=1,http://doman.com?query=1, domain.com, doman.com?query=1 and other
Submitted by
Redfern.89
-
8 years ago
2015-05-29 11:57
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Find all BR tags in a string
ECMAScript (JavaScript)
Find all BR tags in a string
Submitted by
Mahima
-
8 years ago
2015-05-29 10:47
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
URL with ASP Cookieless SessionId
PCRE (PHP <7.3)
This matches a ASP Cookieless SessionId. Useful if, for example, after deprecating Cookieless sessions you want to redirect any clients with a cached sessionId to the plain url.
Submitted by
Zumey
-
8 years ago
2015-05-29 07:11
1
5 upvotes, 4 downvotes (score 26.7%) (You must be signed in to vote)
Any telephone number with at least 6 digits
PCRE (PHP <7.3)
Telephone number can come with extra characters to denote country, region, etc
Submitted by
https://co.linkedin.com/in/andresfelipecardona
-
8 years ago
2015-05-28 21:45
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Gentoo atom parsing
PCRE (PHP <7.3)
no description available
Submitted by
selurvedu
-
8 years ago
2015-05-28 17:28
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
dropping first digit (2) andy advice?
PCRE (PHP <7.3)
\_\d(.+) for _2015041122
Submitted by
jbt
-
8 years ago
2015-05-28 16:43
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
test
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-05-28 16:21
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
Parsing the response of an oauth provider for token and session
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-05-27 11:16
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
year match
PCRE (PHP <7.3)
2010-2012
Submitted by
tazbir
-
8 years ago
2015-05-27 05:15
-2
3 upvotes, 5 downvotes (score 13.7%) (You must be signed in to vote)
Find a IPV4
ECMAScript (JavaScript)
no description available
Submitted by
Jon Dotsoy
-
8 years ago
2015-05-27 04:15
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
decimal or not number
PCRE (PHP <7.3)
acepts 1.000 and 1000
Submitted by
jvs
-
8 years ago
2015-05-26 22:24
1
2 upvotes, 1 downvotes (score 20.8%) (You must be signed in to vote)
Repeating Group
PCRE (PHP <7.3)
There are 2 segments within this data that start with REF* and end with a tilde (~). I can capture one of them but not both. I've read and cant seem to figure this one out. I DO need to preface with the NM1*03 piece.
Submitted by
Chris.
-
8 years ago
2015-05-26 21:05
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Extract info from anime filename
ECMAScript (JavaScript)
no description available
Submitted by
Haellsigh
-
8 years ago
2015-05-26 20:40
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
regex
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-05-26 18:02
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
yous
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-05-26 16:36
1
1 upvotes, 0 downvotes (score 20.7%) (You must be signed in to vote)
Adyen reason when AUTHORISATION success
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-05-26 15:40
1
...
597
598
599
600
601
602
603
...
649
Get the root of a Windows path
0
1 upvotes, 1 downvotes (score 9.5%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
^
(
[
a
-
zA
-
Z
]
:
(?=
\\
)
|
\\\\
(?:
[^
\*
:<>?
\\\/
|
]
+
\\
[^
\*
:<>?
\\\/
|
]
+
|
\?\\
(?:
[
a
-
zA
-
Z
]
:
(?=
\\
)
|
(?:
UNC
\\
)?
[^
\*
:<>?
\\\/
|
]
+
\\
[^
\*
:<>?
\\\/
|
]
+
)
)
)
/
Open regex in editor
Description
Loading markdown...
Submitted by
J5lx
-
8 years ago
2015-05-14 15:20