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 18,040 community submitted regex patterns...
4
Mask credit card
PCRE (PHP <7.3)
no description available
Submitted by
Albert Paris
-
9 years ago
4
Prime number regex
PCRE (PHP <7.3)
no description available
Submitted by
originally "Abigail", comp.lang.perl.misc
-
11 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
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
Strip out domain extensions except for Microsoft .net technologies.
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
12 years ago
4
YouTube Grabber Cleanup
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
11 years ago
4
Match Brackets and anything inside
ECMAScript (JavaScript)
no description available
Submitted by
andreayang
-
11 years ago
4
html tags
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
4
Credit Card Number
PCRE (PHP <7.3)
Validates Credit Card Numbers of different type. Supports Visa, MasterCard, American Express, Diners Club, Discover and JCB Taken from http://www.regular-expressions.info/creditcard.html If you want to support only a particular type, customise it based on following....
Submitted by
Ehsan
-
10 years ago
0
URL matching
PCRE (PHP <7.3)
Complete url matching with storage of various parameters
Submitted by
hjpotter92
-
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
1
Validate alphanumeric and numeric range
PCRE (PHP <7.3)
For Validating alphanumeric and numeric range
Submitted by
anonymous
-
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
Task 1
PCRE (PHP <7.3)
Finds a happy smile, except sad one
Submitted by
Kovalev Evgeny
-
11 years ago
4
IPV4 address validation using recursion
PCRE (PHP <7.3)
Validate IPv4 addresses using PCRE's recursion patterns. A shorter but less efficient alternative to https://regex101.com/r/wZ6oY5/1
Submitted by
Captain Haddock
-
10 years ago
4
Mobile phone russia
ECMAScript (JavaScript)
Submitted by
Johhny
-
9 years ago
3
phone
Python
matches: + example: +52 33 3884 7720 +1 770 343 5788
Submitted by
miqui
-
10 years ago
4
url
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
5
Separate words (works with spaces, dashes and underscores)
PCRE (PHP <7.3)
no description available
Submitted by
marcoslhc
-
10 years ago
5
ipv6 Validation
PCRE (PHP <7.3)
Handle all condition for ipv6 example: 1) FE80::8329 2) FE80::FFFF:8329 3) FE80::B3FF:FFFF:8329 4) FE80::0202:B3FF:FFFF:8329...
Submitted by
Lim Yew Teck, Nicholas
-
9 years ago
1
...
884
885
886
887
888
...
902
Community Library Entry
0
Regular Expression
.NET 7.0 (C#)
@"
^
(?=
(?<http>
(?:
https
?
:
\/\/
){1}
(?:
www
\.
)?
)?
)
(?
(?=
\k<http>
?
(?<ipaddr>
(?:
\d
{1,3}
\.
){3}
\d
{1,3}
(?:
\:
\d
{1,5}
)?
)
)
\k<http>
?
\k<ipaddr>
(?:
\.
[
\w
]
{1,9}
)?
|
\k<http>
(?:
[
\w
]
\.
?
){1,255}
\.
[
\w
]
{1,9}
)
(?:
\/
.
*
)?
$
"
gm
Open regex in editor
Description
Can be used to validate on URL's.
Submitted by
anonymous
-
2 years ago