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
Most upvotes
Most downvotes
Highest Score
Lowest Score
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 9,340 community submitted regex patterns...
4
Strip multi-line (star) comments from JavaScript, while leaving any CDATA sections intact.
PCRE (PHP <7.3)
This regular expression removes multi-line (star) comments from JavaScript, while leaving any CDATA sections intact. Use the global (g) modifier to match them all (if you plan to use PHP's preg_replace, the g modifier is not necessary), and use the (s) modifier to make dots match newlines (this will...
Submitted by
Dane MacMillan
-
12 years ago
4
For Auto RTFs
PCRE (PHP <7.3)
no description available
Submitted by
Dan Bloomquist
-
12 years ago
4
Strip out domain extensions except for Microsoft .net technologies.
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
12 years ago
4
1st TSV
PCRE (PHP <7.3)
no description available
Submitted by
DynV
-
12 years ago
4
Get stuff inside <a> tags
PCRE (PHP <7.3)
Get stuff inside tags, which are between certain words
Submitted by
Jerry
-
11 years ago
4
YouTube Grabber Cleanup
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
11 years ago
4
Task 1
PCRE (PHP <7.3)
Finds a happy smile, except sad one
Submitted by
Kovalev Evgeny
-
11 years ago
4
Hungarian ANDOK system id
PCRE (PHP <7.3)
no description available
Submitted by
Tana
-
11 years ago
4
outer Parentheses
PCRE (PHP <7.3)
Finds the outermost pair of parentheses. Compatible with any amount of nesting
Submitted by
Jonas Gerneth
-
10 years ago
4
REGEX to parse IIS7 Log File into FluentD
PCRE (PHP <7.3)
This regex parses the entire line of the IIS log files (without detail on the AgentID) for usage into FluentD. Q&C - juan.carniglia@gmail.com
Submitted by
Juan Carniglia
-
10 years ago
4
Element's Attribute Value in XML (simple)
PCRE (PHP <7.3)
Simple regular expression for extracting attribute value of the element in XML-string. Attribute value should be in quotes.
Submitted by
Nikita Danilov
-
10 years ago
4
Command handling
PCRE (PHP <7.3)
Handles commands like in CMD
Submitted by
anonymous
-
10 years ago
4
Remove HTML tags
PCRE (PHP <7.3)
This regex is used to remove HTML tag on string
Submitted by
Jordane BACHELET
-
10 years ago
4
semver
Recommended
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>
-
10 years ago
4
parsing a numeric strings with backslash using regexp
PCRE (PHP <7.3)
no description available
Submitted by
A.K. Asik
-
10 years ago
4
Simple Linux File Absolute Path Tester
PCRE (PHP <7.3)
Match simple linux file absolute path as /usr/share/my-folder/helloworld.jpg
Submitted by
FLonpl6
-
10 years ago
4
AMEX, VISA, MASTERCARD, and DISCOVER REGEX
PCRE (PHP <7.3)
First pass at a way to find credit card data using regex.
Submitted by
David Maislin
-
10 years ago
4
Validate a Particular File Extension
PCRE (PHP <7.3)
Validates a File Path and makes sure the correct extension is at the end.
Submitted by
Andrew Morpurgo
-
10 years ago
4
utf-8 hex.
PCRE (PHP <7.3)
utf-8 hex. code armenian. Firs character regexp
Submitted by
Dyxx
-
10 years ago
4
uri parser
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
10 years ago
1
...
459
460
461
462
463
...
467
Community Library Entry
2
Regular Expression
.NET 7.0 (C#)
@"
^
(?>
(?'protocol'
[
a
-
zA
-
Z
]
+
)
://
)?
(?'domain'
[
a
-
zA
-
Z0
-
9.
\-
_
]
*
)?
(?>
:
(?'port'
\d
{1,5}
)
)?
/
(?'path'
[
a
-
zA
-
Z0
-
9_
\-
%
]
+
)
(?:
(?>
\?
(?'query'
[
a
-
zA
-
Z0
-
9_
\-
=&%
]
+
)
)
(
)
|
(?>
#
(?'anchor'
[
a
-
zA
-
Z0
-
9_
\-
%
]
+
)
)
(
)
){0,2}
$
"
gm
Open regex in editor
Description
Matches protocol, domain, port, path, query and anchor as named capturing groups.
Submitted by
Jonathan
-
a year ago
(Last modified a year ago)