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,260 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 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
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
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
spring logback parser
PCRE2 (PHP >=7.3)
Spring boot logback 日志正则匹配。 样例日志 2019-12-27 13:52:38.201 INFO 1 --- [Thread-8] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2019-12-27 13:52:39.535 INFO 1 --- [Thread-8] com.alibaba.druid.pool.DruidDataSource : {dataSource-1} closed ...
Submitted by
LiuDecai
-
2 years ago
2021-07-06 08:09
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
mega.nz files and folders
PCRE2 (PHP >=7.3)
Regex for matching https://mega.nz file and folder URLs. https://github.com/tonikelope/megabasterd/issues/215
Submitted by
anonymous
-
2 years ago
2021-07-06 17:55
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Mobile Number Regex
PCRE2 (PHP >=7.3)
The following regex validates international mobile numbers
Submitted by
anonymous
-
2 years ago
2021-07-14 10:58
1
2
3
4
...
113
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