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 14,060 community submitted regex patterns...
-1
freeCodeCamp: Restrict Possible Usernames
PCRE (PHP <7.3)
Usernames are used everywhere on the internet. They are what give users a unique identity on their favorite sites. You need to check all the usernames in a database. Here are some simple rules that users have to follow when creating their username. 1) The only numbers in the username have to be at...
Submitted by
anonymous
-
7 years ago
0
SAG - File download
PCRE (PHP <7.3)
\S\/(\/(download|getn|getnum|file)\.php)\?\S*
Submitted by
anonymous
-
7 years ago
0
Find number before last 3 and add a comma
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
Find end digits of number
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
Remove Tabs and check for more than one word after search
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
años extendido
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
Phone number with dashes
PCRE (PHP <7.3)
Finds valid phone numbers, including dashes Valid: 223-444-5555 Invalid:...
Submitted by
anonymous
-
7 years ago
0
IP Address
PCRE (PHP <7.3)
Validate the structure of the IP address with suffix of red
Submitted by
anonymous
-
7 years ago
0
Entête de fiche
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
logs
PCRE (PHP <7.3)
2017-06-29\s06:50:(\d+).?([A-Z]+).?(?:\[(.*?+))
Submitted by
anonymous
-
7 years ago
0
logs
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
iranian cell-number pattern
PCRE (PHP <7.3)
Iranian cell phone number pattern to being used in regular expression this work for iranian operator (irancell , Taliya, MCI,RighTel) Irancell and Taliya : 093 , MCI : 091 , RighTel : 092 cheers
Submitted by
nasserFet
-
7 years ago
0
string valid contains html
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
USD
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
Palindromes
PCRE (PHP <7.3)
How to detect palindromes up to 12 characters in length. I chose 12 because currently, the longest palindrome that is an actual word is "tattarrattat". This was a fun exercise because someone said pcre can't detect palindromes. Check and mate, my good sir.
Submitted by
Damian Torres
-
7 years ago
0
Spreadsheet sheet reference
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
Remove CDATA tags
.NET 7.0 (C#)
no description available
Submitted by
anonymous
-
7 years ago
(Last modified a year ago)
0
Email
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
7 years ago
0
First name last name reversal
PCRE (PHP <7.3)
Format name listing by putting last name first
Submitted by
Panagiotis Plevrakis
-
7 years ago
0
Time regex HH:MM:SS
PCRE (PHP <7.3)
no description available
Submitted by
Panagiotis Plevrakis
-
7 years ago
1
...
455
456
457
458
459
...
703
DNS and lenght
2
Regular Expression
PCRE (PHP <7.3)
/
^
(?=
.
{3,256}
$
)
(
(?:
[
a
-
z0
-
9-
]
{2,65}
\.
)?
[
a
-
z0
-
9-
]
{2,256}
\.
[
a
-
z
\.
]
{2,6}
)
$
/
img
Open regex in editor
Description
Ideal for filter Domain with or without subdomain, and length less than 256.
Submitted by
Presta-Lab
-
8 years ago