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,060 community submitted regex patterns...
1
Replace :parameters on route navigation
PCRE (PHP <7.3)
Lets modify a route dinamically from any word that starts with ':' until the next slash
Submitted by
anonymous
-
5 years ago
1
Apache: if a url comes with & but without a ? starting the query param, replace the first & with a ?
PCRE (PHP <7.3)
If you got a malformed URL with a query string not starting with a question mark, this Apache rule will catch it and make a redirection, replacing the first ampersand with the mandatory question mark for a query string. The negative lookahead will make sure that it don't replaces a well formed quer...
Submitted by
anonymous
-
5 years ago
1
Semantic App Version (major.minor.patch) is greater than or equal to 6.1.3
PCRE (PHP <7.3)
This regular expression will match app versions following the Semantic Versioning scheme greater than or equal to 6.1.3 The first capturing group will match app versions 6.1.*, where the patch version is greater than or equal to 3. The second capturing group will match app versions. 6.., where the ...
Submitted by
anonymous
-
5 years ago
(Last modified a year ago)
1
Surname regex validation
PCRE (PHP <7.3)
no description available
Submitted by
https://www.linkedin.com/in/peralta-steve-atileon/
-
5 years ago
1
C# class declaration
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
1
Matriculas [PT]
PCRE (PHP <7.3)
Código que permite identificar novas matrículas de Portugal, bem como as antigas e dividir por grupos
Submitted by
anonymous
-
5 years ago
1
Vérification d'une adresse IP
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
1
Modern Chrome User Agent
PCRE (PHP <7.3)
Detects modern Chromium-based browsers Chrome >= 67 YaBrowser >= 18.7 Opera >= 54 Samsung Internet >= 9.2...
Submitted by
slavafomin
-
5 years ago
1
Modern Firefox User Agent
PCRE (PHP <7.3)
Detects modern Firefox browser versions Firefox >= 60 These versions require only ~29.33 KB of core-js polyfills.
Submitted by
slavafomin
-
5 years ago
1
Modern Safari versions User Agent
PCRE (PHP <7.3)
Detects modern Safari versions by User Agent string Safari & iOS Safari >= 10 These browsers require ~62 KB of core-js polyfills.
Submitted by
slavafomin
-
5 years ago
1
22 Jimmy
PCRE (PHP <7.3)
.+\.{a-z}+$ / .+\.{a-z}+$...
Submitted by
anonymous
-
5 years ago
1
Replace many spaces to one
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
1
Wordless Date Validation
PCRE (PHP <7.3)
Validate and capture different dates without words for example: dd/mm/yyyy, d/m/yy, yyyy-mm-dd, yy-mm-dd
Submitted by
anonymous
-
5 years ago
1
URL with port and hash
PCRE (PHP <7.3)
URL with port and hash
Submitted by
anonymous
-
4 years ago
1
Exclude extension from file basename
PCRE (PHP <7.3)
Description Exclude extension from file basename - get filename only! BASENAME = FILENAME.EXTENSION
Submitted by
Cober@Axterbach
-
4 years ago
1
IPv4 private CIDR range RFC1918
Golang
Validates that you provide a CIDR in one of the following valid ranges. 0.0.0 – 127.255.255.255 127.0.0.0/8 0.0.0 – 10.255.255.255 10.0.0.0/8 16.0.0 – 172. 31.255.255 172.16.0.0/12 192.168.0.0 – 192.168.255.255 192.168.0.0/16...
Submitted by
David Stockton
-
4 years ago
1
Exclude subdirs from URL
PCRE (PHP <7.3)
Excludes certain subdirs unless they contain specific valid patterns
Submitted by
anonymous
-
4 years ago
1
Iranian Mobile Numbers
PCRE (PHP <7.3)
Iranian Mobile Numbers By: EmIT (Seyed Emad Armoun) www.EmadArmoun.ir
Submitted by
anonymous
-
4 years ago
1
Match what we don't want, to replace with empty
PCRE (PHP <7.3)
This was necessary for cases such as the Amazon Settlements reports To import these, we concatenate many file into one. The header in this concatenated file is reapeated as many times as files were concatenated. We have seen that is there are no sales with a promotion for a determined period, the fi...
Submitted by
anonymous
-
4 years ago
1
Name,last name, first name, full name
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
1
...
516
517
518
519
520
...
603
URL with port and hash
1
Regular Expression
PCRE (PHP <7.3)
/
(
(
(
[
A
-
Za
-
z
]
{3,9}
:
(?:
\/\/
)?
)
(?:
[
-;:&=
\+\$
,
\w
]
+
@
)?
[
A
-
Za
-
z0
-
9.-
]
+
|
(?:
www
.
|
[
-;:&=
\+\$
,
\w
]
+
@
)
[
A
-
Za
-
z0
-
9.-
]
+
)
(
:
[
0
-
9
]
{0,5}
)?
(
#
[
\w
]
*
)?
(
(?:
\/
[
\+
~%
\/
.
\w
-_
]
*
)?
\?
?
(?:
[
-
\+
=&;%@.
\w
_
]
*
)
#
?
(?:
[
.
\!\/\\
w
]
*
)
)?
)
/
gi
Open regex in editor
Description
URL with port and hash
Submitted by
anonymous
-
4 years ago