Please enable JavaScript to use this web application.
Regular
Expressions
101
Social
Donate
Info
Regex Editor
Community Patterns
Account
Regex Quiz
Settings
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 7.0 (C#)
Rust
Sponsors
There are currently no sponsors.
Become a sponsor today!
Community Patterns
Search among 12,780 community submitted regex patterns...
3
CSS Length Units
PCRE (PHP <7.3)
Matches CSS Length Units according to: http://www.w3schools.com/cssref/css_units.asp
Submitted by
Sander Backus
-
9 years ago
3
Script Tags
PCRE (PHP <7.3)
This is used when removing Script Tags and their content.
Submitted by
Chris Sumners
-
8 years ago
3
Time duration format
PCRE (PHP <7.3)
Match time duration in the following formats only: 1h 30m 59m 1h 33m 11h 2m
Submitted by
Pooja Khorjuvekar
-
8 years ago
3
Proxy matcher
PCRE (PHP <7.3)
Matches proxies in ip:port format. Takes into account that octets cant start with a 0, and that octets that are not the first octet can be a 0 if there are no more numbers behind it.
Submitted by
Dank meme machine
-
8 years ago
3
Escherichia coli, partial genome simple coding region search
PCRE (PHP <7.3)
NC_000913.3 Escherichia coli str. K-12 substr. MG1655, patial genome
Submitted by
anonymous
-
8 years ago
3
Validación de numeros de teléfono
PCRE (PHP <7.3)
no description available
Submitted by
devsolarte@gmail.com
-
8 years ago
3
Multiple emails seperated with comma
ECMAScript (JavaScript)
Multiple emails seperated with comma allowed multiple dot ltds
Submitted by
Hassan Youssef
-
8 years ago
3
Find css lines with px sizing
ECMAScript (JavaScript)
Use to find css sizing that migh need conversion to vs or alike.
Submitted by
Bob
-
8 years ago
3
File name Cleanup
ECMAScript (JavaScript)
Strips all non "A-Z,a-z,0-9+-_" characters and replaces them with a single "-"
Submitted by
Apsis0215
-
8 years ago
3
Get any positive integer
PCRE (PHP <7.3)
All real numbers can be divided into three categories: positive, negative and zero; Match all positive number Match: 2 9...
Submitted by
norihiori, Me-me
-
8 years ago
3
IBAN
ECMAScript (JavaScript)
The complete regex for IBAN numbers
Submitted by
anonymous
-
8 years ago
3
Song Splitter
PCRE (PHP <7.3)
Split an audio filename into a readable format for playlists (like jPlayer) assuming the audio file is named like the following: Artist - Song Title.mp3 Band Name - Track Title ft. Another Artist.m4a demon.devin - Faithless Angel (to no avail remix).mp3
Submitted by
demon.devin
-
8 years ago
3
Sql Injection detection
ECMAScript (JavaScript)
this regex detect any sql injections .
Submitted by
Saeed.Tabrizi@gamil.com
-
8 years ago
3
Markdown link rewriting
ECMAScript (JavaScript)
A regular expression which finds all instances of markdown links and helps with rewriting link paths.
Submitted by
Will Vaughn
-
8 years ago
3
HSL(A) Color Matching
PCRE (PHP <7.3)
This allows for both hsl and hsla color patterns to be matched. hsla(50.5deg, .531%, .9%, 1.0) The hue can be matched without the word deg. Hue is from 0-360 Percentage allows for decimals. Percentage is from 0-100%...
Submitted by
anonymous
-
5 years ago
3
Full Best URL Regex Match
PCRE (PHP <7.3)
Best Full URL Regex to match URL, This is simple and can match 64K of url regex under 77ms Regex Matches All Below and more: https://example.domain http://example.domain...
Submitted by
divineniiquaye
-
4 years ago
3
Email
ECMAScript (JavaScript)
This is a bit simpler version that is still quite robust. It was taken from a Formik example.
Submitted by
codefinity
-
3 years ago
3
discord invite link
ECMAScript (JavaScript)
detect discord invite links such as: discord.gg/link discord.com/invite/link .gg/link .com/invite/link...
Submitted by
padero
-
3 years ago
3
Viet Nam Phone Number
ECMAScript (JavaScript)
Viet Nam Phone Number Regex. This regex include: Cellphone number: Viettel, Vinaphone, Mobiphone, Vietnamobile, Iteltelecom, Reddi (055) Telephone number (such as: 024, 028,...) Start with Exactly 10 or 11 numbers
Submitted by
tuangt12
-
3 years ago
3
Match any layer bracket pair (.NET)
.NET 7.0 (C#)
Match any layer bracket pair
Submitted by
Yakumo Yukari
-
3 years ago
1
...
629
630
631
632
633
...
639
remove comments from php code
11
Regular Expression
PCRE (PHP <7.3)
@
(?(DEFINE)
(?<next_open_tag>
[^
<
]
*
+
(?i:
<
+
+
[^
<?s
]
[^
<
]
*
|
<
+
+
(?!
\?
php
|
\?
=
|
script
\s
*
language
\s
*
=
\s
*
(
[
\'
"
]
?
)
php
\g{-1}
\s
*
>
)
[^
<
]
*
)*
+
(?i:
<
+
+
(?:
\?
php
|
\?
=
|
[^
>
]
+
)
|
\z
)
)
)
\A
(?&next_open_tag)
\K
|
[^
'"`/#<?
]
*
+
(?:
'
(?:
[^
'
\\
]
+
|
\\
.
)*
+
'
[^
\'
"`/#<?
]
*
|
"
(?:
[^
"
\\
]
+
|
\\
.
)*
+
"
[^
\'
"`/#<?
]
*
|
`
(?:
[^
`
\\
]
+
|
\\
.
)*
+
`
[^
\'
"`/#<?
]
*
|
/
(?!
[
/*
]
)
[^
\'
"`/#<?
]
*
#
stop
for
//
or
/*
|
#
if
close
tag
?>
\?
(?:
>
(?&next_open_tag)
[^
\'
"`/#<?
]
*
|
)