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,440 community submitted regex patterns...
12
14 upvotes, 2 downvotes (score 70.4%) (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
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)
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
-
8 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
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 4 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
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
object
PCRE2 (PHP >=7.3)
Json Object
Submitted by
anonymous
-
2 years ago
2021-07-02 15:32
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
US phone number
PCRE2 (PHP >=7.3)
US phone number, try to catch as many as possible
Submitted by
anonymous
-
2 years ago
2021-07-03 04:46
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
.htaccess wordpress redirect uploads to production domain
PCRE2 (PHP >=7.3)
.htaccess wordpress redirect uploads to production domain
Submitted by
anonymous
-
2 years ago
2021-07-03 06:41
1
2
3
4
...
122
Regex for parsing function command line arguments
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
(
[^
"
\t\n
]
+
|
"
[^
"
]
*
"
)
/
g
Open regex in editor
Description
Loading markdown...
Submitted by
Braun
-
9 years ago
2015-03-22 16:06