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...
2
Replace \n by <br />
ECMAScript (JavaScript)
Replace non-ending string \n by the HTML tag
Submitted by
anonymous
-
11 years ago
7
split URL into location-resource-params (JavaScript)
ECMAScript (JavaScript)
Extract resource location, name and query parameters from a URL (JavaScript version)
Submitted by
cebence
-
11 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
11
find all link(<a>) tags expect your links in href attribute
ECMAScript (JavaScript)
YourLink - not found AnotherLink - found
Submitted by
KoT
-
9 years ago
8
Alphanumeric and Spaces
PCRE (PHP <7.3)
Alow alphanumeric characters and spaces
Submitted by
JTN
-
9 years ago
(Last modified a year ago)
12
Full url parse, domain, path, params
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
14
RFC3339 DateTime
Recommended
PCRE (PHP <7.3)
Validates a RFC3339 DateTime format. Does not validates the Data
Submitted by
anonymous
-
9 years ago
6
reg Ex number range check
PCRE (PHP <7.3)
Hi, I am trying to get a reg ex that will test a number range and also allow european number convention like , for decimal point. I have this one for range check - ^(4-9{3}|1-9{4,5}|12{6}|30-4{5}|3500000)$ and I have this one for allow comma ^\s?([\d\.]+(\,\d{1,2})?|\,\d{1,2})\s$ but I need a comb...
Submitted by
TimJ
-
11 years ago
11
Codice fiscale
PCRE (PHP <7.3)
Check "codice fiscale"
Submitted by
Luca
-
9 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
9
Removing an XML Nodes namespace prefix from a XML string wit
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
11 years ago
10
Just validate one sequence of
PCRE (PHP <7.3)
sdfs sdfs FLBREV00022230 dsfsdfs sdfsf FLBREV00022234 In this case is false
Submitted by
Fiipe
-
10 years ago
11
remove comments from php code
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
10 years ago
3
split sentence regex
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
10 years ago
10
Valid Telephone Number
ECMAScript (JavaScript)
This regex validates varying types of telephone numbers.
Submitted by
Adam Recvlohe
-
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
7
PAN CARD validation
PCRE (PHP <7.3)
checks for valid PAN card for Indian users.
Submitted by
karan thakkar
-
11 years ago
1
Regular expression to remove all puncutation
Python
Removes all of the puncutation present inlcuding \n,\t,\r
Submitted by
Abhinav Gupta
-
11 years ago
12
Find Reddit Threads
Python
Simply searches for the thread-id in any kind of valid reddit-URL.
Submitted by
Mio
-
10 years ago
1
...
3
4
5
6
7
...
902
Community Library Entry
1
Regular Expression
Python
r"
\[
[
\d
\.
]
+
\]
(
\d
{2,3}
\.
\d
{1,3}
\.
\d
{1,3}
\.
\d
{1,3}
)
[
\,
:
\s
\[\]
\d
{1,2}
\w
]
+
(
[
\d
\.
]
{4,7}
)+
[
\w\s\d
\(\)\.
,%
]
+
"
gm
Open regex in editor
Description
no description available
Submitted by
anonymous
-
8 years ago