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 13,980 community submitted regex patterns...
1
Match on Valid IP
PCRE (PHP <7.3)
Match on VALID IP address anywhere in string.
Submitted by
KyleV
-
6 years ago
1
Match on phone number in any standard format
PCRE (PHP <7.3)
Match on a phone number in ANY standard phone number format.
Submitted by
KyleV
-
6 years ago
1
SIREN
PCRE (PHP <7.3)
SIREN for french business register number
Submitted by
Maxime
-
6 years ago
1
SIRET
PCRE (PHP <7.3)
Business register number for France SIRET
Submitted by
Maxime
-
6 years ago
1
RNA
PCRE (PHP <7.3)
French association register number RNA
Submitted by
Maxime
-
6 years ago
1
Match HTML img elements with URL source
PCRE (PHP <7.3)
Matches all img tags that have a URL for the src attribute. Useful for updating all those links in your email templates, or where ever your using the \ tag
Submitted by
Doom87er
-
6 years ago
1
Replace for CSS
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
6 years ago
1
Regex to group output of $(ip addr) interface
Python
For this task, I did not need inet6 (IPv6 stuff), so I left it out. The regex in its current state does not allow for that to be included without manually adding the entire second part
Submitted by
anonymous
-
6 years ago
1
Get SQL FROM
PCRE (PHP <7.3)
SELECT * FROM wp_users WHERE user_login = 'username'
Submitted by
Lars Jansen
-
6 years ago
1
IPV4 regex
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
6 years ago
1
toby regex
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
6 years ago
1
Detect JSON entries
PCRE (PHP <7.3)
This Regexp here has probably been done a ton of times, but I kind of figured one out here, so I decided to post it anyways. It may or may not be a duplicate, but this also will ignore any strings that a JSON entry may have so that it knows not to detect something if a value contains text like "som...
Submitted by
Ghostyrun
-
6 years ago
1
c/c++ include
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
6 years ago
1
find word near another word (10 words distance)
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
6 years ago
1
ESR und ESR+
PCRE (PHP <7.3)
ESR Einzahlungsscheine (CH)
Submitted by
dhu
-
6 years ago
1
Validate image URL
PCRE (PHP <7.3)
Adaptation of RFC-3986 uri validation - https://tools.ietf.org/html/rfc3986 Validates that URL contains an image (jpg/jpeg/png/gif) reference whilst also allowing for queries Key parts of URL are captured in named groups The URL portion is also optional, so will validate just an image filename if r...
Submitted by
Norris
-
6 years ago
1
The Ultmate Email validation regex
PCRE (PHP <7.3)
This regex validates an email against RFC 5322 with RFC 6530 merged in. This allows for checking for International email addresses. Note that this regex works on bytes so any Unicode characters will have to be encoded in UTF-8 before they will pass.
Submitted by
anonymous
-
6 years ago
1
State abbreviations
PCRE (PHP <7.3)
This regex efficiently captures any U.S. state abbreviation in only 117 characters, as opposed to 159 characters to list each state individually.
Submitted by
anonymous
-
6 years ago
1
Version RegEx
PCRE (PHP <7.3)
Matches version numbers consisting of only digits and dots.
Submitted by
anonymous
-
6 years ago
1
Finnish Mobile Number Validation
PCRE (PHP <7.3)
Checks for valid Finnish mobile numbers, takes in to account possible operator codes, different ways of marking country code if supplied and allows for hyphens and spaces in places where they are commonly used.
Submitted by
anonymous
-
6 years ago
1
...
177
178
179
180
181
...
699
extract query and path params - incomplete
0
Regular Expression
PCRE2 (PHP >=7.3)
/
^
(
[
a
-
z
]
[
a
-
z0
-
9+
\-
.
]
*
:
(
\/\/
[^
\/
?#
]
+
)?
)?
(
(?:
\/
[
a
-
z
]
{4}
\/
(
[
a
-
z
]
{2}
\-
[
a
-
z
]
{2}
)
\/
)
(
[
a
-
z0
-
9
\-
._~%!$&'()*+,;=:@
\/
]
*
)
)
(?:
\?
?
)
(
(
[
a
-
z0
-
9
\-
._~%!$'()*+,;:@
]
+
)
(?:
\=
)
(
[
a
-
z0
-
9
\-
._~%!$'()*+,;:@
\/
]
*
)
)*
(
&
*
)
/
gm
Open regex in editor
Description
Working on a regex to extract path and query params
Submitted by
anonymous
-
2 years ago