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 4,640 community submitted regex patterns...
12
14 upvotes, 2 downvotes (score 70.4%) (You must be signed in to vote)
Get path from any text
Recommended
This entry has been specifically selected by our team to be a great submission
PCRE2 (PHP >=7.3)
Get path (windows style) from any type of text (error message, e-mail corps ...), quoted or not. THIS IS THE SINGLE LINE VERSION !_ If you want understand how it work or edit it, go https://regex101.com/r/7o2fyy Relative path are not supported...
Submitted by
nitrateag
-
10 months ago
2023-01-31 14:38
(Last modified 4 months ago)
2023-07-23 20:17
10
12 upvotes, 2 downvotes (score 60.1%) (You must be signed in to vote)
Find Reddit Threads
Python
Simply searches for the thread-id in any kind of valid reddit-URL.
Submitted by
Mio
-
9 years ago
2015-03-12 09:23
10
12 upvotes, 2 downvotes (score 60.1%) (You must be signed in to vote)
entity
Python
no description available
Submitted by
anonymous
-
8 years ago
2015-11-20 01:12
81
178 upvotes, 97 downvotes (score 58.9%) (You must be signed in to vote)
Distinguish torrent files (series vs movies)
Python
A neat regex for finding out whether a given torrent name is a series or a movie. Returns the full name of the series with the separator needed to make it pretty (ie, replace it with space or what you want). Also returns the season number or the year for the movie/series, depending on what was prev...
Submitted by
Firas Dib
-
9 years ago
2014-06-26 09:59
(Last modified 4 months ago)
2023-07-20 15:08
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
IOS3166 Country Code Identification REGEX
Python
IOS3166 Country Code Identification REGEX
Submitted by
theitgeek@recu.org.uk
-
8 years ago
2015-06-07 04:48
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
Form Tag
Python
Form Tag
Submitted by
Jay Patel
-
8 years ago
2016-02-26 06:49
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
psswd
Python
no description available
Submitted by
anonymous
-
8 years ago
2016-03-24 09:04
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
Find and extract email domain
Python
Find and extract email domain. Ex: test@example.pt -> extract 'example.pt'
Submitted by
Fnxk
-
8 years ago
2016-04-03 17:03
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
Match Only Text
Python
no description available
Submitted by
anonymous
-
7 years ago
2016-07-05 03:56
7
8 upvotes, 1 downvotes (score 56.5%) (You must be signed in to vote)
extract subdomain(if available) or domain from URL
Python
This regex should extract the subdomain, if any, or the domain, if no subdomain is used, from an arbitrary URL
Submitted by
trevi@twanda.com
-
8 years ago
2016-04-08 13:05
9
12 upvotes, 3 downvotes (score 54.8%) (You must be signed in to vote)
English date in "dd mmmm yyyy" format
Python
Parse an English date following the "dd mmmm yyyy" format.
Submitted by
Tantale
-
9 years ago
2015-05-18 19:41
6
7 upvotes, 1 downvotes (score 52.9%) (You must be signed in to vote)
SO: fail2ban regular to find 403 request in nginx
Python
http://stackoverflow.com/q/25778420/2072035
Submitted by
anonymous
-
9 years ago
2014-09-15 11:32
(Last modified 4 months ago)
2023-07-27 20:59
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Equation matching (without equal)
Python
use this to get value of any side of an equation. You can combine this with https://regex101.com/r/fH5kJ1/1
Submitted by
Kerosene2000
-
8 years ago
2015-07-01 19:50
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
import url image
Python
import url image
Submitted by
bartimeys
-
8 years ago
2015-12-18 08:44
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
CloudFlare
PCRE2 (PHP >=7.3)
Cloud Flare
Submitted by
anonymous
-
2 years ago
2021-06-29 16:27
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Email
PCRE2 (PHP >=7.3)
email format control
Submitted by
ahmetbarut
-
2 years ago
2021-07-10 13:06
8
13 upvotes, 5 downvotes (score 49.1%) (You must be signed in to vote)
repeat group match
Python
no description available
Submitted by
anonymous
-
8 years ago
2015-07-24 21:02
6
8 upvotes, 2 downvotes (score 49%) (You must be signed in to vote)
Find consecutive duplicate words
Python
no description available
Submitted by
anonymous
-
8 years ago
2015-08-31 22:17
5
6 upvotes, 1 downvotes (score 48.7%) (You must be signed in to vote)
Bible reference extractor
Python
For scraping http://skepticsannotatedbible.com/
Submitted by
antaytheist-owner
-
8 years ago
2016-04-04 08:31
9
20 upvotes, 11 downvotes (score 46.9%) (You must be signed in to vote)
domain - host
Python
no description available
Submitted by
anonymous
-
8 years ago
2015-09-29 17:50
1
2
3
4
...
232
repeat group match
8
13 upvotes, 5 downvotes (score 49.1%) (You must be signed in to vote)
Regular Expression
Python
r"
/
?
t
?
e
?
s
?
t
?
/
(
\w
+
)+
"
g
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
8 years ago
2015-07-24 21:02