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,420 community submitted regex patterns...
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Parse conventional commits message
PCRE2 (PHP >=7.3)
https://conventionalcommits.org Parses commits like type(scope)!: subject
Submitted by
Alex Kinnee
-
a year ago
2022-08-29 23:59
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Email with gmail+ implementation
PCRE2 (PHP >=7.3)
Regex of email with ability to add gmail's +example system example: root email = user@gmail.com gmail+ = user+extra@gmail.com
Submitted by
brad
-
a year ago
2022-09-02 18:33
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Replace sub-strings in string
.NET (C#)
Replace sub-strings in string
Submitted by
anonymous
-
9 months ago
2023-01-01 01:47
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Palindromes
PCRE2 (PHP >=7.3)
Matches palindromes: arbitrary length ignores non-significant characters (spaces, ponctuation) ignores accents, provided the text is NFD-normalized recursive palindromes (e.g. "a été à"): either match the longest one ("a été à") or the nested ones individually ("a", "été", "à") (see comment)
Submitted by
NicolaF_
-
8 months ago
2023-02-01 17:47
(Last modified 8 months ago)
2023-02-02 08:27
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Remove extra/useless python elements for GPT input.
PCRE2 (PHP >=7.3)
This RegEx removes unused elements such as inline comments and blank lines in python code. This will save you tokens and time when using GPT-3+ or ChatGPT to help code and debug.
Submitted by
LukeL
-
8 months ago
2023-02-01 19:16
(Last modified 8 months ago)
2023-02-02 00:41
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Phone number for all countries
.NET (C#)
Phone number for all countries. Valid symbols: ( ), -, whitespace
Submitted by
Alexander Smirnov
-
8 months ago
2023-02-07 07:33
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Get ip address (only ipv4) Validator
.NET (C#)
Get ip address (only ipv4) Validator
Submitted by
Mr.Tang
-
7 months ago
2023-02-20 18:43
(Last modified 7 months ago)
2023-02-21 12:05
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Aus Mobile number
.NET (C#)
validates against multiple common formats
Submitted by
anonymous
-
6 months ago
2023-03-20 06:22
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
URL Regex
.NET (C#)
Matches protocol, domain, port, path, query and anchor as named capturing groups.
Submitted by
Jonathan
-
3 months ago
2023-07-06 08:43
(Last modified 3 months ago)
2023-07-06 08:45
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
IDN Domains and Subdomains
PCRE2 (PHP >=7.3)
IDN Domains & Normal Domains This regex is able to identify any type of domain or subdomain whether it is IDN or normal, this includes domains in emojis, non-Latin characters, etc.
Submitted by
NCK
-
2 months ago
2023-07-26 14:47
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Mikrotik firewall logs
Golang
Matching for mikrotik ROS 7 Used in promtail and grafana
Submitted by
anonymous
-
a month ago
2023-08-11 19:09
(Last modified a month ago)
2023-08-11 21:09
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
regex101: RFC1918 Private IPv4 Addresses, but limited to matching /24 subnet host IDs
PCRE2 (PHP >=7.3)
POSIX ERE compatible, suitable for usage in Bash [ testing Attributions Derived from [regex101: RFC1918 - Private IPv4 addresses by 0100101101001.
Submitted by
anonymous
-
a month ago
2023-08-23 07:20
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
1
2
3
4
5
...
121
US phone number
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Regular Expression
PCRE2 (PHP >=7.3)
/
(
\+
?
(
\b
1
)?
[
\
.
\/
-
]
?
(
(?(2)
|
(
\b
)
)
|
(
\(
)
)
\d
{3}
(?
(?<=
\(
\d
{3}
)
\)
|)
[
\
.
\/
-
]
?
)?
(?(1)
|
\b
)
\d
{3}
[
\
.
\/
-
]
?
\d
{4}
[
\
]
?
(
[
xX
]
[
\
]
?
\d
{1,5}
)?
\b
/
gm
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
2 years ago
2021-07-03 04:46