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,480 community submitted regex patterns...
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
math chain comparisons with optional matched paren
Python
no description available
Submitted by
anonymous
-
8 years ago
2015-11-13 16:25
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
preprocess text files to include only readable and text words
Python
for large corpus cleaning
Submitted by
aliabbas petiwala
-
8 years ago
2015-11-23 12:37
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
parse tag data with multiline
Python
parse tag data with multiline
Submitted by
Ali GĂ–REN
-
8 years ago
2015-11-24 00:35
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Password Validation
Python
Checks for password containing at least 1 Upper case, 1 lower case, 1 digit and 1 special character, all together with a length of at least 8. (This pattern allows any order of the requried elements, other than what was been distributed here before)
Submitted by
Tom Spielvogel
-
8 years ago
2016-02-03 13:16
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
test
Python
no description available
Submitted by
anonymous
-
8 years ago
2016-02-09 19:50
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Regex for Chemical Compounds
Python
no description available
Submitted by
Haiming Zhao
-
8 years ago
2016-02-23 17:09
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
exp1
Python
no description available
Submitted by
anonymous
-
8 years ago
2016-05-18 13:24
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
EclipseKeyword_2
Python
no description available
Submitted by
Rashmin
-
7 years ago
2016-06-10 09:05
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
AliasMatch
Python
no description available
Submitted by
anonymous
-
7 years ago
2016-06-22 12:27
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Find PHP object variables
Python
Find PHP object variables, and replace them with (array)brackets.
Submitted by
The Milkman
-
7 years ago
2016-06-22 15:33
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Adress regex
Python
no description available
Submitted by
Ali
-
7 years ago
2016-06-28 18:02
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Password (4 Classes)
Python
1 Uppercase 1 lower case 1 number 1 not a number or letter
Submitted by
anonymous
-
7 years ago
2016-08-06 21:47
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
IPv6 detection
Python
It's too large to match with all which seems like an IPv6. It's not perfect, but it's detects more valid IPv6 than some others regex.
Submitted by
Ajabep
-
7 years ago
2016-08-15 13:31
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
.*(\d+).* Selects last number
Python
no description available
Submitted by
anonymous
-
7 years ago
2016-09-13 20:27
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)
Ansible Host Var checking
Python
We had an issue where the "hosts=some_var" value could cause mass deployments if the wrong value was passed through. Specifically a comma with nothing surrounding it (i.e. "hosts=,"). This regex will allow us to fail when certain characters are present.
Submitted by
anonymous
-
7 years ago
2017-02-10 19:33
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
lottery data picker
Python
for azlottoapi
Submitted by
anonymous
-
3 years ago
2020-12-28 20:55
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
IpAddress
Python
Ensure the ip address format is correct
Submitted by
aaa
-
3 years ago
2021-01-14 09:00
2
2 upvotes, 0 downvotes (score 34.2%) (You must be signed in to vote)
Matching decimals in european format (dot as grouping separator, comma as decimal separator)
Java 8
A regex for validating decimal numbers in the European number format (in many parts of Europe at least, including Germany). A comma is used as a separator for the decimal number, a dot as a separator for thousand places.
Submitted by
Florian Drees
-
3 years ago
2021-03-12 23:31
(Last modified 3 years ago)
2021-03-14 17:43
1
2
3
4
5
6
...
124
IP Address validator
35
77 upvotes, 42 downvotes (score 55.8%) (You must be signed in to vote)
Regular Expression
ECMAScript (JavaScript)
/
^
(
25
[
0
-
5
]
|
2
[
0
-
4
]
[
0
-
9
]
|
[
01
]
?
[
0
-
9
]
[
0
-
9
]
?
)
\.
(
25
[
0
-
5
]
|
2
[
0
-
4
]
[
0
-
9
]
|
[
01
]
?
[
0
-
9
]
[
0
-
9
]
?
)
\.
(
25
[
0
-
5
]
|
2
[
0
-
4
]
[
0
-
9
]
|
[
01
]
?
[
0
-
9
]
[
0
-
9
]
?
)
\.
(
25
[
0
-
5
]
|
2
[
0
-
4
]
[
0
-
9
]
|
[
01
]
?
[
0
-
9
]
[
0
-
9
]
?
)
$
/
Open regex in editor
Description
Loading markdown...
Submitted by
krzysp
-
8 years ago
2015-06-18 12:52