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 9,440 community submitted regex patterns...
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
How do I write a Regex to inspect Cisco Interfaces
PCRE (PHP <7.3)
I am asking for help in writing a regular expression to shorten this expression. I need the string below to search every interface within the range of 1 -24 to validate the configuration. If one interface does not have the required configuration then the expression fails. interface GigabitEtherne...
Submitted by
Pirates
-
9 years ago
2015-04-11 19:39
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
images url match in text
PCRE (PHP <7.3)
no description available
Submitted by
Redfern.89
-
8 years ago
2015-06-09 00:14
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
Div content
PCRE (PHP <7.3)
no description available
Submitted by
mohammadsaleh
-
8 years ago
2015-06-23 08:44
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
Validate Base64 with new lines (e.g. GPG base64 messages)
PCRE (PHP <7.3)
This regular expression validates if given string is formatted in Base64, additional it accepts new lines, since payload can have new lines in it.
Submitted by
wpodgorski
-
8 years ago
2015-10-02 09:27
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
Select all number greater than 36
PCRE (PHP <7.3)
no description available
Submitted by
Mansoor
-
8 years ago
2015-10-18 08:30
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
Extract All Steam Keys
PCRE (PHP <7.3)
Extract all Steam Keys from a Given String
Submitted by
Ashesh Kumar
-
8 years ago
2015-10-21 01:53
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
apache access log
PCRE (PHP <7.3)
parse the apache access log
Submitted by
pagu
-
8 years ago
2016-01-19 14:35
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
Match a valid IPv4 or IPv6 address
PCRE (PHP <7.3)
This regular expression will match an IPv4 address as well as both compressed or uncompressed IPv6 address.
Submitted by
Tom Groeneveld, SevOne.com
-
8 years ago
2016-03-07 13:17
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
french phone number + match right part
PCRE (PHP <7.3)
Matches french numbers (not special numbers like 115, 18). First matching group contains the right part without prefix (0, +33, 33, 033, or 0033).
Submitted by
xdrm-brackets
-
8 years ago
2016-04-18 14:25
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
JSON recognition
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2016-04-22 07:11
3
4 upvotes, 1 downvotes (score 37.6%) (You must be signed in to vote)
strong password validation
PCRE (PHP <7.3)
This regex matches only when all the following are true: password has minimum 2 uppercase letters password has minimum 2 lowercase letters password has minimum 2 numerals (0-9) password has minimum 2 special characters, of the group !@#$%^&*()-_=+{};:, password has no more than 2 consecutive identic...
Submitted by
anonymous
-
6 years ago
2017-07-04 03:44
3
15 upvotes, 12 downvotes (score 37.3%) (You must be signed in to vote)
split sentence regex
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-06-05 01:31
3
13 upvotes, 10 downvotes (score 36.8%) (You must be signed in to vote)
Prime number regex
PCRE (PHP <7.3)
no description available
Submitted by
originally "Abigail", comp.lang.perl.misc
-
10 years ago
2013-07-20 21:13
1
21 upvotes, 20 downvotes (score 36.5%) (You must be signed in to vote)
IP Addresses
PCRE (PHP <7.3)
Matches IP Addresses with minimum false positives
Submitted by
Austin-Hanson
-
8 years ago
2015-07-16 16:42
0
23 upvotes, 23 downvotes (score 36.1%) (You must be signed in to vote)
utf-8 language
PCRE (PHP <7.3)
this regex is support for all languages
Submitted by
Jigar Dhaduk
-
8 years ago
2015-09-15 13:13
3
10 upvotes, 7 downvotes (score 36%) (You must be signed in to vote)
UK Postcode Checker
PCRE (PHP <7.3)
This is an improvement of the very good tH9mQ1/1. It did not pickup on the first two postcodes found here: //http://en.wikipedia.org/wiki/Postcodes_in_the_United_Kingdom
Submitted by
Flexander
-
9 years ago
2014-11-06 11:41
3
5 upvotes, 2 downvotes (score 35.9%) (You must be signed in to vote)
Get Nth value (3 times)
PCRE (PHP <7.3)
capture Nth character from string, 3 times
Submitted by
K.
-
10 years ago
2013-10-04 03:08
3
5 upvotes, 2 downvotes (score 35.9%) (You must be signed in to vote)
split URL into location-resource-params
PCRE (PHP <7.3)
Extract resource location, name and query parameters from a URL
Submitted by
cebence
-
10 years ago
2014-05-22 17:10
3
5 upvotes, 2 downvotes (score 35.9%) (You must be signed in to vote)
Capture only top-level (root) domain in URL
PCRE (PHP <7.3)
no description available
Submitted by
guyfawkes
-
9 years ago
2015-05-01 10:03
3
8 upvotes, 5 downvotes (score 35.5%) (You must be signed in to vote)
everything that doesn't match .gitignore at the end
PCRE (PHP <7.3)
must match: selection/nl/example.xml selection/example.xml selection/blabla.txt selection/es/ ...
Submitted by
anonymous
-
9 years ago
2014-10-17 12:16
1
...
7
8
9
10
11
12
13
...
472
Valid date (DD-MM-YYYY) from 1900 to 2099
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
Java 8
"
^
(
(
0
)*
[
1
-
9
]
|
1
[
012
]
|
3
[
01
]
)
-
(
(
0
)*
[
1
-
9
]
|
1
[
012
]
|
2
[
012
]
|
3
[
01
]
)
-
(
19
[
0
-
9
]
[
0
-
9
]
|
20
[
0
-
9
]
[
0
-
9
]
)
$
"
gm
Open regex in editor
Description
Loading markdown...
Submitted by
Nevix-Sama
-
9 months ago
2023-02-24 19:28