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,640 community submitted regex patterns...
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
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Html tag parser
PCRE2 (PHP >=7.3)
This regex will help you to parse html tag. Example Title ...
Submitted by
denchiklut
-
2 years ago
2021-08-27 09:22
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Check Phone numbers
PCRE2 (PHP >=7.3)
Other patterns
Submitted by
https://joserobinson.com
-
2 years ago
2021-09-18 14:56
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Match Javanese Script Syllable
PCRE2 (PHP >=7.3)
Match any syllable based on javanese script unicode
Submitted by
anonymous
-
2 years ago
2021-09-18 13:08
(Last modified 2 years ago)
2021-09-18 13:16
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
RFC1918 - Private IPv4 addresses
PCRE2 (PHP >=7.3)
Validate a given IP v4 address against all three defined Private IPv4 Subnets as statet in RFC1918 10.0.0.0/8 172.16.0.0/20 192.168.0.0/16 ...
Submitted by
0100101101001
-
2 years ago
2021-09-22 11:58
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Grabify URL Detector
PCRE2 (PHP >=7.3)
Detects any Grabify IP tracker links
Submitted by
ShadowNox
-
2 years ago
2021-09-26 17:54
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
UUID 4
PCRE2 (PHP >=7.3)
Detects any UUID 4 strings
Submitted by
ShadowNox
-
2 years ago
2021-09-26 18:11
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Markdown Heading
Java 8
Parses the text following a '#' and a space all the way up to the next return character. Additional #'s can be added for parsing of other type of headings!
Submitted by
Hansen
-
2 years ago
2021-12-14 21:41
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Delete hour range
PCRE2 (PHP >=7.3)
Select duplicate a.m. - p.m range
Submitted by
profeivan
-
2 years ago
2022-03-05 01:44
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Asciidoc PlantUML Block
Java 8
Regex to select PlantUML Block in Asciidoc documents
Submitted by
anonymous
-
2 years ago
2022-03-15 13:11
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Pattern for usual email address
PCRE2 (PHP >=7.3)
Intentionally leaves out weird stuff such as IPV4 or IPV6 for the domain part and quoted usernames with invalid chars in the addressee part. Handles internationalized domains with soft validation (only structural matching) and blocks domain parts starting or ending with dashes or containing double d...
Submitted by
Victor Schröder
-
2 years ago
2022-03-22 11:51
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 2 months ago)
2023-07-20 23:11
2
3 upvotes, 1 downvotes (score 30.1%) (You must be signed in to vote)
Regex tutorial
Java 8
Case insensitive match the whole word betwween \bword\b
Submitted by
anonymous
-
3 years ago
2020-07-01 10:00
(Last modified 2 months ago)
2023-07-20 07:05
2
3 upvotes, 1 downvotes (score 30.1%) (You must be signed in to vote)
Mime type parser
.NET (C#)
A "simple" regex to parse mime types. Handles all commonly occurring parts of a mime type string such as: Type Subtype Subtype's with an extra extension (e.g. svg+xml) (Optional input) Multiple parameters (Optional input)...
Submitted by
Vespion
-
7 months ago
2023-02-14 14:11
(Last modified 7 months ago)
2023-02-14 16:03
2
3 upvotes, 1 downvotes (score 30.1%) (You must be signed in to vote)
Discord Username (old & new)
PCRE2 (PHP >=7.3)
Accomodate for Discord's username changeover and match against either the old username or the new username. But only one or the other. Match: CesarHvl#9000 cesarhvl cesar.hvl...
Submitted by
cesarhvl
-
3 months ago
2023-06-23 20:16
1
2
3
4
5
6
...
132
IPv4 Matcher
-1
1 upvotes, 2 downvotes (score 6.1%) (You must be signed in to vote)
Regular Expression
Java 8
"
^
(?:
(?:
25
[
0
-
5
]
|
2
[
0
-
4
]
\d
|
1
?
\d\d
?
)
\.
){3}
(?:
25
[
0
-
5
]
|
2
[
0
-
4
]
\d
|
1
?
\d\d
?
)
$
"
mg
Open regex in editor
Description
Loading markdown...
Submitted by
EMAM1999
-
2 years ago
2021-03-24 16:23