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,860 community submitted regex patterns...
17
20 upvotes, 3 downvotes (score 74.7%) (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
21
24 upvotes, 3 downvotes (score 71.9%) (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 2 months ago)
2023-07-19 08:36
12
14 upvotes, 2 downvotes (score 70.4%) (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
17
22 upvotes, 5 downvotes (score 69.6%) (You must be signed in to vote)
Email (RFC2822)
Recommended
This entry has been specifically selected by our team to be a great submission
ECMAScript (JavaScript)
Email address compliant with RFC2822
Submitted by
Jago
-
8 years ago
2015-07-01 09:31
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
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 2 months ago)
2023-07-22 19:26
14
16 upvotes, 2 downvotes (score 67.2%) (You must be signed in to vote)
Strict Password Validator
ECMAScript (JavaScript)
This regex matches only when all the following are true: password must contain 1 number (0-9) password must contain 1 uppercase letters password must contain 1 lowercase letters password must contain 1 non-alpha numeric number...
Submitted by
qho
-
6 years ago
2018-01-31 01:03
(Last modified 2 months ago)
2023-07-19 15:28
10
11 upvotes, 1 downvotes (score 64.6%) (You must be signed in to vote)
UUID
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
2014-12-01 17:13
7
7 upvotes, 0 downvotes (score 64.6%) (You must be signed in to vote)
Email regex validation
ECMAScript (JavaScript)
RegEx email /^((?!\.)[\w-_.]*)(@\w+)(\.\w+(\.\w+)?)$/gim; Just playing with Reg Ex. This to validate emails in following ways ...
Submitted by
https://www.linkedin.com/in/peralta-steve-atileon/
-
5 years ago
2019-03-17 21:49
(Last modified 2 months ago)
2023-07-27 21:03
9
10 upvotes, 1 downvotes (score 62.3%) (You must be signed in to vote)
youtube url match
ECMAScript (JavaScript)
extract video id, index, play list id from youtube url
Submitted by
anonymous
-
8 years ago
2015-08-19 03:04
5
5 upvotes, 0 downvotes (score 62.2%) (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
22
34 upvotes, 12 downvotes (score 59.7%) (You must be signed in to vote)
grab valid css rules and properties
ECMAScript (JavaScript)
no description available
Submitted by
Pavel Dominguez
-
8 years ago
2015-06-03 19:17
8
9 upvotes, 1 downvotes (score 59.6%) (You must be signed in to vote)
IPv4 Validator
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
3 years ago
2020-07-26 21:19
(Last modified 2 months ago)
2023-08-07 17:36
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
-
8 years ago
2015-05-26 15:18
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 2 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
-
8 years ago
2015-05-30 10:27
13
19 upvotes, 6 downvotes (score 56.6%) (You must be signed in to vote)
us postal/zip
ECMAScript (JavaScript)
no description available
Submitted by
jay johnson
-
10 years ago
2014-01-13 22:15
1
2
3
4
...
643
URL Validator
12
75 upvotes, 63 downvotes (score 46%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
(
(
(
ftp
|
http
|
https
)
:
\/\/
)
|
(
\/
)
|
(
..
\/
)
)
(
\w
+
:
{0,1}
\w
*
@
)?
(
\S
+
)
(
:
[
0
-
9
]
+
)?
(
\/
|
\/
(
[
\w
#!:.?+=&%@!
\-\/
]
)
)?
/
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
9 years ago
2014-09-24 08:41