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 13,720 community submitted regex patterns...
19
22 upvotes, 3 downvotes (score 77%) (You must be signed in to vote)
Cron schedule
Recommended
This entry has been specifically selected by our team to be a great submission
PCRE (PHP <7.3)
Validate cron lines (even the ones commented out)
Submitted by
anonymous
-
7 years ago
2016-06-02 15:45
24
27 upvotes, 3 downvotes (score 74.4%) (You must be signed in to vote)
Parsing browser User Agents
PCRE (PHP <7.3)
From a (fairly large) list of User Agent strings, extract the OS, Browser, and Device Type.
Submitted by
OnlineCop
-
9 years ago
2015-01-23 16:47
(Last modified 4 months ago)
2023-07-19 08:36
14
16 upvotes, 2 downvotes (score 73.9%) (You must be signed in to vote)
RFC3339 DateTime
Recommended
This entry has been specifically selected by our team to be a great submission
PCRE (PHP <7.3)
Validates a RFC3339 DateTime format. Does not validates the Data
Submitted by
anonymous
-
8 years ago
2016-02-12 11:44
11
13 upvotes, 2 downvotes (score 68.3%) (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
8
8 upvotes, 0 downvotes (score 67.6%) (You must be signed in to vote)
Conventional Commits validation
PCRE (PHP <7.3)
This regex prevents the writing of non-standard conventional commits. I'm available on my github
Submitted by
Krisque
-
2 years ago
2022-01-03 20:30
(Last modified 4 months ago)
2023-07-22 19:26
8
8 upvotes, 0 downvotes (score 67.6%) (You must be signed in to vote)
Fiddler raw body to PHP array
PCRE (PHP <7.3)
no description available
Submitted by
garsax
-
8 years ago
2016-02-20 19:43
6
6 upvotes, 0 downvotes (score 67.1%) (You must be signed in to vote)
best youtube id match ( iframe embed replace ready )
Recommended
This entry has been specifically selected by our team to be a great submission
PCRE (PHP <7.3)
MATCH ANY YOUTUBE ID author : mi-ca v1.0 – 2017.03.08 This Regex match any youtube url and grab the ID. Embed ready √ --...
Submitted by
mi-ca.ch
-
5 years ago
2019-03-12 16: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
11
14 upvotes, 3 downvotes (score 59%) (You must be signed in to vote)
remove comments from php code
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
2015-05-26 15:18
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
9
11 upvotes, 2 downvotes (score 57.8%) (You must be signed in to vote)
Fixo LDN CSP e SEM CSP
PCRE (PHP <7.3)
no description available
Submitted by
Marcos Müller
-
9 years ago
2014-11-18 14:02
483
1566 upvotes, 1083 downvotes (score 57.2%) (You must be signed in to vote)
regex101.com id grabber
PCRE (PHP <7.3)
grabs the ID for the regex101.com permalink to code
Submitted by
chris mccoy
-
10 years ago
2013-12-12 13:09
(Last modified 4 months ago)
2023-07-19 16:25
13
24 upvotes, 11 downvotes (score 57.2%) (You must be signed in to vote)
Match Gmail Email
Recommended
This entry has been specifically selected by our team to be a great submission
PCRE (PHP <7.3)
Match Gmail Email
Submitted by
Óscar EnrÃquez
-
9 years ago
2014-11-20 23:58
236
717 upvotes, 481 downvotes (score 57%) (You must be signed in to vote)
Matching email addresses per RFC5322
PCRE (PHP <7.3)
The BNF rules from RFC 5322 transformed to PCRE by Nikita Popov and described in the post http://nikic.github.io/2012/06/15/The-true-power-of-regular-expressions.html.
Submitted by
Michael Musson
-
10 years ago
2013-10-23 17:46
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
-
9 years ago
2015-05-30 10:27
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
Find All Python imports
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
2014-10-07 12:03
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
relative to absolute
PCRE (PHP <7.3)
relative to absolute
Submitted by
xp_prg
-
9 years ago
2015-01-20 01:16
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)
Quartz Cron Validation
PCRE (PHP <7.3)
http://stackoverflow.com/questions/2362985/verifying-a-cron-expression-is-valid-in-java
Submitted by
anonymous
-
8 years ago
2015-07-27 12:13
1
2
3
4
...
686
Fiddler raw body to PHP array
8
8 upvotes, 0 downvotes (score 67.6%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
(
[^
=
]
+
)
=
(
[^
&
]
*
)
&
/
g
Open regex in editor
Description
Loading markdown...
Submitted by
garsax
-
8 years ago
2016-02-20 19:43