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 community submitted regex patterns...
0/512
38
Cron schedule
Created
·
2016-06-02 15:45
Flavor
·
PCRE (Legacy)
Recommended
·
Validate cron lines (even the ones commented out)
Submitted by
anonymous
36
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
33
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
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
14
UUID
Created
·
2014-12-01 17:13
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
16
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
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
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
16
us postal/zip
Created
·
2014-01-13 22:15
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
jay johnson
24
grab valid css rules and properties
Created
·
2015-06-03 19:17
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
Pavel Dominguez
13
US Currency Format
Created
·
2016-01-23 17:46
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
9
Fixo LDN CSP e SEM CSP
Created
·
2014-11-18 14:02
Flavor
·
PCRE (Legacy)
no description available
Submitted by
Marcos Müller
485
regex101.com permalink id grabber
Created
·
2013-12-12 13:09
Updated
·
2024-04-11 14:32
Flavor
·
PCRE (Legacy)
Grabs the ID for the regex101.com permalink code. If a revision number is provided, grab that as well.
Submitted by
chris mccoy
238
Matching email addresses per RFC5322
Created
·
2013-10-23 17:46
Flavor
·
PCRE (Legacy)
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
money: either 0 or 2 dp
Created
·
2015-11-18 19:34
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
10
If-Then-Else Conditionals
Created
·
2015-08-28 15:52
Flavor
·
PCRE (Legacy)
no description available
Submitted by
anonymous
10
MikroTik FireWall
Created
·
2015-05-30 10:27
Flavor
·
PCRE (Legacy)
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 reject etc...
Submitted by
HappyIdeasMaker
11
remove comments from php code
Created
·
2015-05-26 15:18
Flavor
·
PCRE (Legacy)
no description available
Submitted by
anonymous
13
Match Gmail Email
Created
·
2014-11-20 23:58
Flavor
·
PCRE (Legacy)
Recommended
·
Match Gmail Email
Submitted by
Óscar EnrÃquez
13
Credit Card Expiry Date
Created
·
2015-05-26 05:34
Flavor
·
ECMAScript (JavaScript)
Allows inserting expiry date as MM/YYYY or MM-YYYY format
Submitted by
Rider
12
Full url parse, domain, path, params
Created
·
2015-08-25 20:54
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
5
C# Regex Extract/Match Nested HTML Elements/Tags
Created
·
2022-03-03 19:13
Updated
·
2023-08-01 07:26
Flavor
·
.NET 7.0 (C#)
With this C# regex, you can easily match/Parse Nested HTML tags. Example input: someTitle SomeHeader anotherHeader HelloWorld Output: anotherHeader HelloWorld string pattern = $@"{ startP }((?'nested'{ openP })|{ closeP }(?'-nested')|\w\W]?){ closeP }"; *'StartP' (Must include open tag), example: <div id="target" *'openP' example: <div *'closeP' example: </div References: [In Depth with RegEx Matching Nested Constructions In Depth with .NET RegEx Balanced Grouping Regular expression matches closed HTML tags (nesting is supported)
Submitted by
w4po
5
among us references
Created
·
2021-05-03 17:10
Updated
·
2021-05-07 18:00
Flavor
·
ECMAScript (JavaScript)
it detects among us references among us aming us mongus amogus sus suspect was not the impostor no imposters remain 3 impostors remain
Submitted by
h
5
get specific value from html tag
Created
·
2016-09-25 06:08
Flavor
·
PCRE (Legacy)
no description available
Submitted by
A.ROA
5
look for any $_POST['name']
Created
·
2016-01-14 23:35
Flavor
·
PCRE (Legacy)
if you are as lazy as me and want to replace every "=$_POST['name'];" using Dreamweaver or any development tool that allows using regular expressions to search in current file/document.
Submitted by
Kevinator
5
Validate hex color
Created
·
2015-12-02 11:14
Flavor
·
PCRE (Legacy)
Validates hexadecimal color codes based on the following rule set: Optionally starting with a hash. 3 or 6 characters in length. Using the [0-9a-f] character set.
Submitted by
Nathaniel Blackburn
5
Codice fiscale italiano
Created
·
2015-10-09 09:14
Flavor
·
PCRE (Legacy)
Oltre a supportare le omocodie controlla in modo restrittivo il carattere relativo al mese di nascita
Submitted by
Aldo Medri
5
Variable name of code
Created
·
2015-09-19 11:18
Flavor
·
PCRE (Legacy)
To get a variable name from a source code: The variable name is before the '=' (equal sign) This is the way to detect. Problem: Only 1 variable can get from 1 line. Unfortunately, this can get variable between after "//" and before ";" too. I made this for fake script debugger. Just get variable from source code and put that after last semicolon with so much tab and messagebox code for every line.
Submitted by
Setsuna
5
relative to absolute
Created
·
2015-01-20 01:16
Flavor
·
PCRE (Legacy)
relative to absolute
Submitted by
xp_prg
7
Remove Widows (PHP)
Created
·
2015-09-13 13:44
Flavor
·
PCRE (Legacy)
Adds a non-breaking space between the last two words of sentences
Submitted by
herkulano
7
Extract currency with currency symbol if present
Created
·
2015-09-11 11:35
Flavor
·
ECMAScript (JavaScript)
Extracts values of the form £nnn,nnn.nn or $nnn.nnn from text
Submitted by
Simon Gardner
7
simple email
Created
·
2015-06-11 01:12
Flavor
·
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
7
validate US (5 & 9 digit) ZipCodes and CA PostalCodes
Created
·
2015-05-15 18:00
Flavor
·
PCRE (Legacy)
no description available
Submitted by
anonymous
7
TimezoneOffset
Created
·
2014-12-09 07:00
Flavor
·
ECMAScript (JavaScript)
used to parse timezone in the format -08:00 or +05:30
Submitted by
Neha
7
[A-Za-z\x{0600}-\x{06FF}\x{1000}-\x{1021}_-][-\w]*
Created
·
2014-11-03 16:04
Flavor
·
PCRE (Legacy)
A-Za-z\x{0600}-\x{06FF}\x{1000}-\x{1021}_-*
Submitted by
[A-Za-z\x{0600}-\x{06FF}\x{1000}-\x{1021}_-][-\w]*
73
Regex for telephone numbers all over the world
Created
·
2014-04-08 07:58
Updated
·
2023-10-09 14:47
Flavor
·
ECMAScript (JavaScript)
Recommended
·
Detects most of the phone numbers all over the world
Submitted by
Aditya Joshi
4
semver
Created
·
2014-10-03 18:53
Flavor
·
PCRE (Legacy)
Recommended
·
Semantic Versioning regex pattern according to Tom Preston-Werner http://semver.org/ https://github.com/mojombo/semver/blob/master/semver.md First version of this regex follows semver 2.0.0. Discussion of semver and this regex was posted on https://github.com/mojombo/semver.org/issues/59
Submitted by
@gvlx <Gerardo Lisboa>
16
Hashtag
Created
·
2014-10-05 17:14
Flavor
·
ECMAScript (JavaScript)
The secret of the Twitterverse.
Submitted by
Joogl
18
Date Regex(DD/MM/yyyy)
Created
·
2015-08-26 06:25
Flavor
·
PCRE (Legacy)
no description available
Submitted by
alcaamado
35
IP Address validator
Created
·
2015-06-18 12:52
Flavor
·
ECMAScript (JavaScript)
Validates IPv4 IP Address
Submitted by
krzysp
20
Between tags content
Created
·
2015-10-24 10:52
Flavor
·
PCRE (Legacy)
no description available
Submitted by
Agustín Bouillet
8
Sentence grabber /w extra check
Created
·
2014-05-29 17:30
Flavor
·
PCRE (Legacy)
Grabs sentences including terms like: e.g. z.b. Figs.These get caught in 1st capturing group. Problem: how to only accept matching sentences which contain pattern \b\d+[a-z]{0,2}\b?
Submitted by
light0
11
Codice fiscale
Created
·
2015-08-19 10:43
Flavor
·
PCRE (Legacy)
Check "codice fiscale"
Submitted by
Luca
9
IPv4 Validator
Created
·
2020-07-26 21:19
Updated
·
2023-08-07 17:36
Flavor
·
PCRE (Legacy)
no description available
Submitted by
anonymous
9
Letters, numbers and blank space
Created
·
2016-01-04 17:31
Flavor
·
PCRE (Legacy)
The following regular expression matches only letter a-z A-Z numbers 0-9 and a blank space for a given string.
Submitted by
Jordan Raychev
9
youtube url match
Created
·
2015-08-19 03:04
Flavor
·
ECMAScript (JavaScript)
extract video id, index, play list id from youtube url
Submitted by
anonymous
9
Extract url GET parameters
Created
·
2014-09-16 08:37
Flavor
·
PCRE (Legacy)
Returns key/value pair of a url. Also works with google fonts which has additional information
Submitted by
anonymous
Load More
Community Library Entry
1
Regular Expression
Created
·
2024-03-31 09:29
Updated
·
2024-03-31 18:24
Flavor
·
.NET 7.0 (C#)
@"
.
*
сума
[
:
\s
]
+
(?<suma>
\d
{1,5}
[
.,
]
\d
{1,2}
)
.
*
(?<pan>
[
0
-
9X
\*
]
{16}
)
.
*
термі
.
*
(?<terminalId>
[
A
-
Z0
-
9
]
{8,10}
)
.
*
код
автор
.
*
(?<approvalCode>
\d
{1,6}
)
.
*
чек
.
*
(?<chq>
\d
{1,10}
)
.
*
rrn
[
:
\s
]
+
(?<rrn>
\d
{1,12}
)
"
mi
Open regex in editor
Description
PrivtBank Receipt Parser vx520
Submitted by
anonymous