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 2,540 community submitted regex patterns...
13
15 upvotes, 2 downvotes (score 72.2%) (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 5 months ago)
2023-07-23 20:17
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
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Caltrans EA validation with optional XX-XXXXXX entry and C##-#????#
.NET (C#)
Checks validity of an EA number first two digits 01-12 followed by hyphen then a number from 0-4 and then 4 numbers or uppercase letters and ending in a 1 or 4 for example "05-1J7601". Adding a capital C to the beginning is also accepted "C05-1J7601", along with the entry of 2 X's hyphen and 6 X's ...
Submitted by
RDJ@Ct
-
8 months ago
2023-04-07 19:11
(Last modified 8 months ago)
2023-04-07 19:51
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
National Insurance Number regular expression
PCRE2 (PHP >=7.3)
This regular expression is build from the description of NINO number of GOV.UK,
Submitted by
Iftakhar Husan
-
3 years ago
2021-03-20 22:05
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Livestock - Visual tag and Back tag
PCRE2 (PHP >=7.3)
Visual tag and Back tag cannot more than 15 characters or only can contain uppercase, lowercase, space and dash.
Submitted by
Adrian Yim
-
3 years ago
2021-03-26 17:11
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
camelCase2snake_case
PCRE2 (PHP >=7.3)
Convert camelCase to snake_case def camelCase2snake_case(txt): """ Convert camelCase to snake_case https://regex101.com/library/wUcSv4...
Submitted by
JV-conseil
-
9 months ago
2023-03-23 19:10
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Discord ID:NAME#DISCRIM match
PCRE2 (PHP >=7.3)
For example, using `Carl-bot to dump members of the @everyone role ordering highest of id`: `!dump @everyone %i:%u -o id` Example of return: 498984530968051713:lanjt#2129 ......
Submitted by
lanjt
-
2 years ago
2021-07-06 00:24
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
example
PCRE2 (PHP >=7.3)
example
Submitted by
anonymous
-
2 years ago
2021-07-13 06:44
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Match any url in text or html (http, https)
PCRE2 (PHP >=7.3)
Match any url in text or html (http, https)
Submitted by
Jérémy Munsch
-
2 years ago
2022-02-02 15:04
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Extract URL parts only named capturing groups
Golang
Extract URL parts only named capturing groups
Submitted by
dixanms
-
2 years ago
2022-02-03 00:00
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
C# Regex Extract/Match Nested HTML Elements/Tags
.NET (C#)
With this C# regex, you can easily match/Parse Nested HTML tags. Example input: someTitle ...
Submitted by
w4po
-
2 years ago
2022-03-03 19:13
(Last modified 4 months ago)
2023-08-01 07:26
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Match any layer bracket pair (.NET)
.NET (C#)
Match any layer bracket pair
Submitted by
Yakumo Yukari
-
2 years ago
2022-03-10 03:13
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
domain for Google Data Studio (re2 dialect)
Golang
Matches subdomain, domain and top level in a field that contains a urls. https://www.whatever.you.want ---> whatever.you.want
Submitted by
anonymous
-
7 years ago
2016-12-12 04:12
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Hostname validation
Golang
Validates subdomain, root domain, and wild card domains
Submitted by
AnonymousDapper
-
7 years ago
2017-01-29 01:16
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
URL parser
PCRE2 (PHP >=7.3)
The best way to parse URL via Regex. This can be used in javascript, PHP, etc.
Submitted by
Ivijan-Stefan Stipic
-
7 years ago
2017-03-08 06:26
(Last modified 5 months ago)
2023-07-20 23:11
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Dutch zipcodes
PCRE2 (PHP >=7.3)
no description available
Submitted by
anonymous
-
3 years ago
2021-02-24 15:54
(Last modified 3 years ago)
2021-02-24 16:08
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Dutch streetnames + housenumber + extension
PCRE2 (PHP >=7.3)
Validates a streetname + housenr + extension Somestreet 12 b
Submitted by
anonymous
-
3 years ago
2021-02-25 08:07
(Last modified a year ago)
2022-10-20 10:52
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
web log entry
PCRE2 (PHP >=7.3)
no description available
Submitted by
PepeRG
-
3 years ago
2021-03-11 23:06
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Url
PCRE2 (PHP >=7.3)
Port https://regex101.com/library/cX0pJ8 to PCRE2 (PHP >= 7.3)
Submitted by
semivori
-
3 years ago
2021-03-17 12:02
1
2
3
4
...
127
example
3
3 upvotes, 0 downvotes (score 43.8%) (You must be signed in to vote)
Regular Expression
PCRE2 (PHP >=7.3)
/
(?:
[
d|e
]
{10}
)
/
gm
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
2 years ago
2021-07-13 06:44