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...
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
find uncommented coffeescript console.logs
ECMAScript (JavaScript)
no description available
Submitted by
valiafetisov
-
8 years ago
2016-01-18 01:52
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Version Matcher
PCRE (PHP <7.3)
Matches version strings.
Submitted by
anmols
-
8 years ago
2016-01-25 18:44
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
extract domain with port
ECMAScript (JavaScript)
no description available
Submitted by
yooresh
-
8 years ago
2016-02-18 08:29
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Function Declaration / Expression
ECMAScript (JavaScript)
matches both function declarations and expressions in javascript. ex. function name () {...} || function () {}
Submitted by
Ja Superior
-
8 years ago
2016-03-09 09:13
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
DNS hostname well-formedness validation
PCRE (PHP <7.3)
Validates that a DNS hostname is well-formed only. You will still need to check that the overall length of the hostname, including the implied trailing "." (if not present), does not exceed 255 bytes.
Submitted by
Jeff Walter
-
8 years ago
2016-03-10 19:44
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
MasterCard validate 2017
PCRE (PHP <7.3)
Match a MasterCard with new range for 2017: 51-55 and 2221-2720 @incarnated
Submitted by
John C
-
8 years ago
2016-03-22 03:14
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
UK Postcode
ECMAScript (JavaScript)
no description available
Submitted by
msyed
-
8 years ago
2016-04-04 13:37
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Validate Argentinian postal code
PCRE (PHP <7.3)
Validates CPA (Código Postal Argentino, spanish for Argentinian Postal Code).
Submitted by
Agustín Bouillet
-
8 years ago
2016-05-28 13:57
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
Validates argentinian postal code
PCRE (PHP <7.3)
Validates the two valid postal codes in Argentina
Submitted by
Agustín Bouillet
-
8 years ago
2016-05-28 14:05
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
,(?=([^\"]*\"[^\"]*\")*(?![^\"]*\"))
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
2016-05-31 12:17
4
4 upvotes, 0 downvotes (score 51%) (You must be signed in to vote)
remove blank keys in query string
PCRE (PHP <7.3)
looks for blank keys in the query string and remove it, in order to make shorter request.
Submitted by
M.Nizam
-
7 years ago
2016-07-03 12:36
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)
Campos Decimais (pt_br)
ECMAScript (JavaScript)
Funciona para campos decimais para moeda nacional brasileira. Aceita números inteiros, separação por milhar e a separação decimal.
Submitted by
Murilo C. Cumerlatto
-
7 years ago
2016-07-21 20:52
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
12
23 upvotes, 11 downvotes (score 50.8%) (You must be signed in to vote)
Username with "_" "-"
ECMAScript (JavaScript)
no description available
Submitted by
Gianvy
-
8 years ago
2015-10-16 15:44
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
31
142 upvotes, 111 downvotes (score 50%) (You must be signed in to vote)
Email address (most used)
ECMAScript (JavaScript)
Email address, most used cases
Submitted by
Jago
-
8 years ago
2015-07-01 09:32
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
1
2
3
4
5
6
7
8
...
640
Match Discord Emoji
0
0 upvotes, 0 downvotes (score 0%) (You must be signed in to vote)
Regular Expression
ECMAScript (JavaScript)
/
(
<a
?
)?
:
\w
+
:
(
\d
{18}
>
)?
|
(
\u00a9
|
\u00ae
|
[
\u2000-\u3300
]
|
\ud83c
[
\ud000-\udfff
]
|
\ud83d
[
\ud000-\udfff
]
|
\ud83e
[
\ud000-\udfff
]
)
/
g
Open regex in editor
Description
Loading markdown...
Submitted by
cph101
-
7 months ago
2023-05-08 16:27