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,320 community submitted regex patterns...
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Credit Card Validation - MasterCard, Visa, Amex, Discover
PCRE (PHP <7.3)
MasterCard - ^5[1-5]\d+ Visa - ^4\d+ Amex - ^3[47]\d+ Discover - 6011|65|64...
Submitted by
Eric Foster
-
7 years ago
2016-07-09 21:06
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
INI Parser
PCRE (PHP <7.3)
Created for purpose of reading an INI file in C# applications. Supports comments and comment escape characters. I plan to add more escape characters (such as \=). s - Section scp - Section Comment Prefix sc - Section Comment...
Submitted by
Raxdiam
-
4 years ago
2020-03-03 01:56
26
91 upvotes, 65 downvotes (score 50.5%) (You must be signed in to vote)
match valid JSON
PCRE (PHP <7.3)
Matches any valid JSON object, matches recursively. Passes all JSON test cases I found.
Submitted by
Mateon1
-
9 years ago
2014-11-17 20:47
9
15 upvotes, 6 downvotes (score 50%) (You must be signed in to vote)
Removing an XML Nodes namespace prefix from a XML string wit
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
10 years ago
2013-11-23 16:21
10
18 upvotes, 8 downvotes (score 50%) (You must be signed in to vote)
Strip Email ID from Name
PCRE (PHP <7.3)
Use this regex to select all characters up to the "" bracket. It works across multiple lines. You can get an email list with only the IDs. This is the pattern it matches: Alpha Person Step 1 (.*) [$ Step 2 [$.$] (.*) gives you aperson@whatever.org...
Submitted by
Jonathan Davidar
-
9 years ago
2014-11-24 22:41
7
10 upvotes, 3 downvotes (score 49.7%) (You must be signed in to vote)
rsyslog test
PCRE (PHP <7.3)
global modifier
Submitted by
dtmland
-
9 years ago
2015-03-18 16:42
7
10 upvotes, 3 downvotes (score 49.7%) (You must be signed in to vote)
Any positive integer except zero
PCRE (PHP <7.3)
no description available
Submitted by
Harsh
-
8 years ago
2015-08-27 10:04
11
22 upvotes, 11 downvotes (score 49.6%) (You must be signed in to vote)
Remove Special Ascii Characters from unicode String
PCRE (PHP <7.3)
By Using this string you can just remove ascii special characters from a unicode string characters like ♥♥♥♥ ▓▒ and other non unicode letters.
Submitted by
Hummad Hassan
-
9 years ago
2015-03-12 11:00
23
88 upvotes, 65 downvotes (score 49.6%) (You must be signed in to vote)
userName
PCRE (PHP <7.3)
1-15 alphanumeric login name
Submitted by
gsanchezc
-
8 years ago
2015-06-06 08:00
36
236 upvotes, 200 downvotes (score 49.4%) (You must be signed in to vote)
http://
PCRE (PHP <7.3)
no description available
Submitted by
Mitus M.
-
10 years ago
2014-03-26 06:44
40
325 upvotes, 285 downvotes (score 49.3%) (You must be signed in to vote)
URL regexp
PCRE (PHP <7.3)
A quite neat regular expression for URLs, e-mails..., I found on Matthew O'Riordan's blog.
Submitted by
Matthew O'Riordan
-
11 years ago
2013-01-14 17:52
6
8 upvotes, 2 downvotes (score 49%) (You must be signed in to vote)
Extract style
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2015-05-07 08:32
11
24 upvotes, 13 downvotes (score 48.8%) (You must be signed in to vote)
Address Check Validation
PCRE (PHP <7.3)
Check for true or false street address format
Submitted by
Dilip Borad
-
10 years ago
2014-01-30 13:56
13
35 upvotes, 22 downvotes (score 48.4%) (You must be signed in to vote)
PHP variable name
PCRE (PHP <7.3)
Valid PHP variable name as defined in the manual at http://php.net/manual/en/language.variables.basics.php
Submitted by
Erin Millard
-
11 years ago
2013-02-05 09:18
18
119 upvotes, 101 downvotes (score 47.5%) (You must be signed in to vote)
Email validation
PCRE (PHP <7.3)
no description available
Submitted by
tutsplus.com
-
9 years ago
2014-09-16 13:45
16
101 upvotes, 85 downvotes (score 47.1%) (You must be signed in to vote)
Alphanumeric Regex
PCRE (PHP <7.3)
no description available
Submitted by
Deepan
-
8 years ago
2015-06-15 13:57
13
53 upvotes, 40 downvotes (score 46.8%) (You must be signed in to vote)
regex101.com id grabber
PCRE (PHP <7.3)
grabs the ID for the regex101.com permalink to code
Submitted by
chris mccoy
-
9 years ago
2014-08-19 16:10
6
9 upvotes, 3 downvotes (score 46.8%) (You must be signed in to vote)
ID003 device info
PCRE (PHP <7.3)
no description available
Submitted by
sasjaq
-
10 years ago
2014-03-12 09:38
6
9 upvotes, 3 downvotes (score 46.8%) (You must be signed in to vote)
Validate Birth Date (d/m/Y)
PCRE (PHP <7.3)
From 1970 to 2015 Replace: (\d{4})$ for (19[7-9]\d|200-1)$
Submitted by
Valdeir Santana
-
8 years ago
2015-11-20 05:28
8
17 upvotes, 9 downvotes (score 46.2%) (You must be signed in to vote)
Alphanumeric and Spaces
PCRE (PHP <7.3)
Alow alphanumeric characters and spaces
Submitted by
JTN
-
8 years ago
2015-08-22 06:46
(Last modified 2 months ago)
2023-07-20 10:55
1
2
3
4
5
6
7
...
466
15.02.2022 15:00:00
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
.NET (C#)
@"
^\d
{2}
\.
\d
{2}
\.
\d
{4}
\d
{2}
:
\d
{2}
:
\d
{2}
$
"
gm
Open regex in editor
Description
Loading markdown...
Submitted by
anonymous
-
8 months ago
2023-02-06 12:57