Please enable JavaScript to use regex101
Regular
Expressions
101
Support Regex101
Social
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Settings
Order By
Most Recent
Most upvotes
Most downvotes
Highest Score
Lowest Score
Filter by Flavor
PCRE2 (PHP)
ECMAScript (JavaScript)
Python
Golang
Java
.NET 7.0 (C#)
Rust
PCRE (Legacy)
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 18,300 community submitted regex patterns...
37
Cron schedule
Created
·
2016-06-02 15:45
Flavor
·
PCRE (Legacy)
Recommended
·
Validate cron lines (even the ones commented out)
Submitted by
anonymous
37
best youtube id match ( iframe embed replace ready )
Created
·
2019-03-12 16:17
Flavor
·
PCRE (Legacy)
Recommended
·
MATCH ANY YOUTUBE ID author : mi-ca v1.0 – 2017.03.08 This Regex match any youtube url and grab the ID. Embed ready √ -- `http://www.youtube.com/watch?v=vpiMAaPTze8 http://youtu.be/l_la5XiQJdk http://youtu.be/NLqAF9hrVbY https://youtu.be/qT47KF5pvfw https://youtu.be/zImHyTyYhM8?t=4s http://www.youtube.com/v/NLqAF9hrVbY?fs=1&hl=en_US http://www.youtube.com/v/NLqAF9hrVbY?fs=1&hl=en_US http://www.youtube.com/watch?v=NLqAF9hrVbY http://www.youtube.com/user/Scobleizer#p/u/1/1p3vcRhsYGo http://www.youtube.com/ytscreeningroom?v=NRHVzbJVx8I http://www.youtube.com/sandalsResorts#p/c/54B8C800269D7C1B/2/PPS-8DMrAn4 http://gdata.youtube.com/feeds/api/videos/NLqAF9hrVbY http://www.youtube.com/watch?v=spDj54kf-vY&feature=g-vrec http://www.youtube.com/watch?v=spDj54kf-vY&feature=youtu.be http://www.youtube-nocookie.com/watch?v=NLqAF9hrVbY http://www.youtube.com/embed/NLqAF9hrVbY https://www.youtube.com/embed/NLqAF9hrVbY https://www.youtube.com/watch?v=MRl7cxSOXdU&feature=youtu.be https://www.youtube.com/watch?v=q07SQFmL4rM https://www.youtube.com/watch?v=q07SQFmL4yM https://www.youtube.com/watch?time_continue=4&v=zImHyTyYhM8 http://www.youtube.com/embed/dQw4w9WgXcQ ... http://www.youtube.com/watch?v=dQw4w9WgXcQ ... http://www.youtube.com/?v=dQw4w9WgXcQ ... http://www.youtube.com/v/dQw4w9WgXcQ ... http://www.youtube.com/e/dQw4w9WgXcQ ... http://www.youtube.com/user/username#p/u/11/dQw4w9WgXcQ ... http://www.youtube.com/sandalsResorts#p/c/54B8C800269D7C1B/0/dQw4w9WgXcQ ... http://www.youtube.com/watch?feature=player_embedded&v=dQw4w9WgXcQ ... http://www.youtube.com/?feature=player_embedded&v=dQw4w9WgXcQ ... https://www.youtube.com/watch?v=DFYRQ_zQ-gk&feature=featured https://www.youtube.com/watch?v=DFYRQ_zQ-gk http://www.youtube.com/watch?v=DFYRQ_zQ-gk //www.youtube.com/watch?v=DFYRQ_zQ-gk www.youtube.com/watch?v=DFYRQ_zQ-gk https://youtube.com/watch?v=DFYRQ_zQ-gk http://youtube.com/watch?v=DFYRQ_zQ-gk //youtube.com/watch?v=DFYRQ_zQ-gk youtube.com/watch?v=DFYRQ_zQ-gk https://m.youtube.com/watch?v=DFYRQ_zQ-gk http://m.youtube.com/watch?v=DFYRQ_zQ-gk //m.youtube.com/watch?v=DFYRQ_zQ-gk m.youtube.com/watch?v=DFYRQ_zQ-gk https://www.youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US http://www.youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US //www.youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US www.youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US https://www.youtube.com/embed/DFYRQ_zQ-gk?autoplay=1 https://www.youtube.com/embed/DFYRQ_zQ-gk http://www.youtube.com/embed/DFYRQ_zQ-gk //www.youtube.com/embed/DFYRQ_zQ-gk www.youtube.com/embed/DFYRQ_zQ-gk https://youtube.com/embed/DFYRQ_zQ-gk http://youtube.com/embed/DFYRQ_zQ-gk //youtube.com/embed/DFYRQ_zQ-gk youtube.com/embed/DFYRQ_zQ-gk https://youtu.be/DFYRQ_zQ-gk?t=120 https://youtu.be/DFYRQ_zQ-gk http://youtu.be/DFYRQ_zQ-gk //youtu.be/DFYRQ_zQ-gk youtu.be/DFYRQ_zQ-gk https://www.youtube.com/watch?v=DFYRQ_zQ-gk&feature=featured https://www.youtube.com/watch?v=DFYRQ_zQ-gk http://www.youtube.com/watch?v=DFYRQ_zQ-gk //www.youtube.com/watch?v=DFYRQ_zQ-gk www.youtube.com/watch?v=DFYRQ_zQ-gk https://youtube.com/watch?v=DFYRQ_zQ-gk http://youtube.com/watch?v=DFYRQ_zQ-gk //youtube.com/watch?v=DFYRQ_zQ-gk youtube.com/watch?v=DFYRQ_zQ-gk https://m.youtube.com/watch?v=DFYRQ_zQ-gk http://m.youtube.com/watch?v=DFYRQ_zQ-gk //m.youtube.com/watch?v=DFYRQ_zQ-gk m.youtube.com/watch?v=DFYRQ_zQ-gk https://www.youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US http://www.youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US //www.youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US www.youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US youtube.com/v/DFYRQ_zQ-gk?fs=1&hl=en_US https://www.youtube.com/embed/DFYRQ_zQ-gk?autoplay=1 https://www.youtube.com/embed/DFYRQ_zQ-gk http://www.youtube.com/embed/DFYRQ_zQ-gk //www.youtube.com/embed/DFYRQ_zQ-gk www.youtube.com/embed/DFYRQ_zQ-gk https://youtube.com/embed/DFYRQ_zQ-gk http://youtube.com/embed/DFYRQ_zQ-gk //youtube.com/embed/DFYRQ_zQ-gk youtube.com/embed/DFYRQ_zQ-gk https://youtu.be/DFYRQ_zQ-gk?t=120 https://youtu.be/DFYRQ_zQ-gk http://youtu.be/DFYRQ_zQ-gk //youtu.be/DFYRQ_zQ-gk youtu.be/DFYRQ_zQ-gk https://www.youtube.com/HamdiKickProduction?v=DFYRQ_zQ-gk `
Submitted by
mi-ca.ch
32
Parsing browser User Agents
Created
·
2015-01-23 16:47
Updated
·
2023-07-19 08:36
Flavor
·
PCRE (Legacy)
From a (fairly large) list of User Agent strings, extract the OS, Browser, and Device Type.
Submitted by
OnlineCop
10
Fiddler raw body to PHP array
Created
·
2016-02-20 19:43
Flavor
·
PCRE (Legacy)
no description available
Submitted by
garsax
19
Get path from any text
Created
·
2023-01-31 14:38
Updated
·
2023-07-23 20:17
Flavor
·
PCRE2 (PHP)
Recommended
·
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 The goal is to catch what "Look like" a path. See the limitations UNC path and prefix path like //./], [//?/] or [//./UNC/] are allowed some url path like [file:///C:/] or [file://] are allowed Catch path quoted with ["] and [']. But these quotes are include with the catch Quoted path is not concerned by limitations Limitations : (only unquoted path) [dot] and [space] is allowed, but not in a row [dot+space] or [space+dot at end of file name isn't catched INSIDE A NAME FILE (or last directory if it is a path to a directory) : [comma] is not supported (it stop the catch) after a first [dot], any [space] stop the catch after a [space], catch is stoped if next character is not a [letter], [digit] or [-] so, double [space] stop the catch Compatibility compatible PCRE, PCRE2 AutoHotkey : don't forget to escape "%" in "`%" /!\ Powershell and .Net /!\\ : this regex need some modification to be interpreted by powershell. You have to replace each (?&CapturGroupName) by \k. Use this powershell code to do this replacement : ` $powershellRegex = @' [Put here the regex to replace (?&CapturGroupName) with \k] '@ -replace '\(\?&(\w+)\)', '\k' ` This example code must return : [Put here the regex to replace \k with \k]
Submitted by
nitrateag
17
CSS Color Matcher
Created
·
2023-08-07 02:36
Flavor
·
ECMAScript (JavaScript)
Pattern matching and extracting color code formats using RegEx. https://github.com/Kyza/color-regex/
Submitted by
Kyza
36
Strict Password Validator
Created
·
2018-01-31 01:03
Updated
·
2023-07-19 15:28
Flavor
·
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 password is 8-16 characters with no space
Submitted by
qho
15
RFC3339 DateTime
Created
·
2016-02-12 11:44
Flavor
·
PCRE (Legacy)
Recommended
·
Validates a RFC3339 DateTime format. Does not validates the Data
Submitted by
anonymous
22
Email (RFC2822)
Created
·
2015-07-01 09:31
Flavor
·
ECMAScript (JavaScript)
Recommended
·
Email address compliant with RFC2822
Submitted by
Jago
12
Conventional Commits validation
Created
·
2022-01-03 20:30
Updated
·
2022-04-05 20:20
Flavor
·
Python
This regex prevents the writing of non-standard conventional commits. I'm available on my github
Submitted by
Krisque
14
UUID
Created
·
2014-12-01 17:13
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
12
Find Reddit Threads
Created
·
2015-03-12 09:23
Flavor
·
Python
Simply searches for the thread-id in any kind of valid reddit-URL.
Submitted by
Mio
15
Email regex validation
Created
·
2019-03-17 21:49
Updated
·
2023-07-27 21:03
Flavor
·
ECMAScript (JavaScript)
RegEx email /^((?!\.)[\w-_.]*)(@\w+)(\.\w+(\.\w+)?)$/gim; Just playing with Reg Ex. This to validate emails in following ways The email couldn't start or finish with a dot The email shouldn't contain spaces into the string The email shouldn't contain special chars ( mailname@domain.com First group takes the first string with the name of email \$1 => (mailname) Second group takes the @ plus the domain: \$2 => (@domain) Third group takes the last part after the domain : \$3 => (.com)
Submitted by
https://www.linkedin.com/in/peralta-steve-atileon/
9
IP Address (with 0s)
Created
·
2015-09-28 21:24
Flavor
·
ECMAScript (JavaScript)
Matches all valid IP addresses from 0.0.0.0 to 255.255.255.255
Submitted by
Ryan Plummer
11
extract subdomain(if available) or domain from URL
Created
·
2016-04-08 13:05
Flavor
·
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
6
Quartz Cron Validation
Created
·
2015-07-27 12:13
Flavor
·
PCRE (Legacy)
http://stackoverflow.com/questions/2362985/verifying-a-cron-expression-is-valid-in-java
Submitted by
anonymous
6
Find and extract email domain
Created
·
2016-04-03 17:03
Flavor
·
Python
Find and extract email domain. Ex: test@example.pt -> extract 'example.pt'
Submitted by
Fnxk
24
grab valid css rules and properties
Created
·
2015-06-03 19:17
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
Pavel Dominguez
10
entity
Created
·
2015-11-20 01:12
Flavor
·
Python
no description available
Submitted by
anonymous
15
us postal/zip
Created
·
2014-01-13 22:15
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
jay johnson
Previous page
1
2
3
…
915
Next page
Community Library Entry
0
Regular Expression
Created
·
2021-02-18 12:17
Flavor
·
PCRE2 (PHP)
/
^\d
{2}
.\d
{2}
.\d
{4}
\s\d
{2}
:
\d
{2}
:
\d
{2}
;
(
\d
{1,3}
,
\d
)
;
(
\d
{1,3}
,
\d
)
;
(
\d
{1,3}
,
\d
)
;
(
\d
{3}
,
\d
)
;
(
\d
{1,2}
,
\d
{3}
)
;
(
[
\d
,
]
+
)
;
(
[
\d
,
]
+
)
;
(
[
\d
,
]
+
)
;
(
[
\d
,
]
+
)
;
(
\d
)
;
$
/
gm
Open regex in editor
Description
Christ Elektronic -> long version
Submitted by
Jan Alexander