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 12,800 community submitted regex patterns...
13
19 upvotes, 6 downvotes (score 56.6%) (You must be signed in to vote)
Credit Card Expiry Date
ECMAScript (JavaScript)
Allows inserting expiry date as MM/YYYY or MM-YYYY format
Submitted by
Rider
-
9 years ago
2015-05-26 05:34
12
17 upvotes, 5 downvotes (score 56.6%) (You must be signed in to vote)
US Currency Format
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
8 years ago
2016-01-23 17:46
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
Find All Python imports
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
2014-10-07 12:03
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
relative to absolute
PCRE (PHP <7.3)
relative to absolute
Submitted by
xp_prg
-
9 years ago
2015-01-20 01:16
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
Quartz Cron Validation
PCRE (PHP <7.3)
http://stackoverflow.com/questions/2362985/verifying-a-cron-expression-is-valid-in-java
Submitted by
anonymous
-
8 years ago
2015-07-27 12:13
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
IP Address (with 0s)
ECMAScript (JavaScript)
Matches all valid IP addresses from 0.0.0.0 to 255.255.255.255
Submitted by
Ryan Plummer
-
8 years ago
2015-09-28 21:24
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
Codice fiscale italiano
PCRE (PHP <7.3)
Oltre a supportare le omocodie controlla in modo restrittivo il carattere relativo al mese di nascita
Submitted by
Aldo Medri
-
8 years ago
2015-10-09 09:14
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
look for any $_POST['name']
PCRE (PHP <7.3)
if you are as lazy as me and want to replace every "=$_POST['name'];" using Dreamweaver or any development tool that allows using regular expressions to search in current file/document.
Submitted by
Kevinator
-
8 years ago
2016-01-14 23:35
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
get specific value from html tag
PCRE (PHP <7.3)
no description available
Submitted by
A.ROA
-
7 years ago
2016-09-25 06:08
7
8 upvotes, 1 downvotes (score 56.5%) (You must be signed in to vote)
validate US (5 & 9 digit) ZipCodes and CA PostalCodes
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
2015-05-15 18:00
7
8 upvotes, 1 downvotes (score 56.5%) (You must be signed in to vote)
simple email
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
8 years ago
2015-06-11 01:12
7
8 upvotes, 1 downvotes (score 56.5%) (You must be signed in to vote)
Extract currency with currency symbol if present
ECMAScript (JavaScript)
Extracts values of the form £nnn,nnn.nn or $nnn.nnn from text
Submitted by
Simon Gardner
-
8 years ago
2015-09-11 11:35
7
8 upvotes, 1 downvotes (score 56.5%) (You must be signed in to vote)
Remove Widows (PHP)
PCRE (PHP <7.3)
Adds a non-breaking space between the last two words of sentences
Submitted by
herkulano
-
8 years ago
2015-09-13 13:44
72
410 upvotes, 338 downvotes (score 56.4%) (You must be signed in to vote)
Regex for telephone numbers all over the world
Recommended
This entry has been specifically selected by our team to be a great submission
ECMAScript (JavaScript)
Detects most of the phone numbers all over the world
Submitted by
Aditya Joshi
-
10 years ago
2014-04-08 07:58
(Last modified 2 months ago)
2023-10-09 14:47
4
4 upvotes, 0 downvotes (score 56.1%) (You must be signed in to vote)
semver
Recommended
This entry has been specifically selected by our team to be a great submission
PCRE (PHP <7.3)
Semantic Versioning regex pattern according to Tom Preston-Werner http://semver.org/ https://github.com/mojombo/semver/blob/master/semver.md First version of this regex follows semver 2.0.0....
Submitted by
@gvlx <Gerardo Lisboa>
-
9 years ago
2014-10-03 18:53
35
77 upvotes, 42 downvotes (score 55.8%) (You must be signed in to vote)
IP Address validator
ECMAScript (JavaScript)
Validates IPv4 IP Address
Submitted by
krzysp
-
8 years ago
2015-06-18 12:52
18
31 upvotes, 13 downvotes (score 55.8%) (You must be signed in to vote)
Date Regex(DD/MM/yyyy)
PCRE (PHP <7.3)
no description available
Submitted by
alcaamado
-
8 years ago
2015-08-26 06:25
15
25 upvotes, 10 downvotes (score 54.9%) (You must be signed in to vote)
Hashtag
ECMAScript (JavaScript)
The secret of the Twitterverse.
Submitted by
Joogl
-
9 years ago
2014-10-05 17:14
11
16 upvotes, 5 downvotes (score 54.9%) (You must be signed in to vote)
Codice fiscale
PCRE (PHP <7.3)
Check "codice fiscale"
Submitted by
Luca
-
8 years ago
2015-08-19 10:43
11
16 upvotes, 5 downvotes (score 54.9%) (You must be signed in to vote)
Full url parse, domain, path, params
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
8 years ago
2015-08-25 20:54
1
2
3
4
5
...
640
Codice fiscale italiano
5
5 upvotes, 0 downvotes (score 56.6%) (You must be signed in to vote)
Regular Expression
PCRE (PHP <7.3)
/
[
A
-
Z
]
{6}
[
0
-
9LMNPQRSTUV
]
{2}
[
ABCDEHLMPRST
]
{1}
[
0
-
7LMNPQRST
]
{1}
[
0
-
9LMNPQRSTUV
]
{1}
[
A
-
Z
]
{1}
[
0
-
9LMNPQRSTUV
]
{3}
[
A
-
Z
]
{1}
/
Open regex in editor
Description
Loading markdown...
Submitted by
Aldo Medri
-
8 years ago
2015-10-09 09:14