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 12,660 community submitted regex patterns...
0
IPv4 - v2
PCRE (PHP <7.3)
Matches a string of digits between 0 and 255.
Submitted by
anonymous
-
5 years ago
0
文本分段(根据标点符号)
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Air traveler document SSR
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Air traveler document SSR
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
path pattern with 10 versions
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
5 years ago
0
GenerateHashValue
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Extract parent domain from DNS FQDN
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
URL Teardown
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
AppDelivery URL Teardown v1
PCRE (PHP <7.3)
Tears down a publishing URL that conforms to the Midland/PNC Application Delivery Publishing URL specification.
Submitted by
anonymous
-
5 years ago
0
US Phone Number
PCRE (PHP <7.3)
Enhanced US Phone Number to reduce false positives.
Submitted by
anonymous
-
5 years ago
0
Min
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
US Phone Number
PCRE (PHP <7.3)
Phone Number from the USA and similar countries using the a single-digit country code (optionally).
Submitted by
Timothy Stam
-
5 years ago
0
Token Key/Value
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Key/value using :
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Key/value using =
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
Key / Value based off =&
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
MM NRC
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
5 years ago
0
ip4校验
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
5 years ago
0
VIN Validator
PCRE (PHP <7.3)
Rules: MUST have 17 alphanumeric letters except I, O, and Q to avoid confusion Position 9 is the check digit 0-9 and X (10)
Submitted by
anonymous
-
5 years ago
0
REGEX - Find 10 digits, starting with '9'. Can contain white-spaces, but these should be ignored.
ECMAScript (JavaScript)
An invoice number always has 10 digits, starting with a '9' (e.g. '9400065741'). But a number should also be found if it contains white-spaces. These numbers should also be found: '9400065741' ' 94 00065741'...
Submitted by
anonymous
-
5 years ago
1
...
470
471
472
473
474
...
633
Community Library Entry
27
Regular Expression
PCRE (PHP <7.3)
/
(?(DEFINE)
(?P<ver>
\d
+
(?:
\.
\d
+
)*
(?!
[
.
\d
]
)
)
(?P<agent>
Mozilla
\/
(?&ver)
)
(?P<os>
(?&os_windows)
|
(?&os_linux)
|
(?&os_macintosh)
|
(?&os_ios)
)
(?P<os_windows>
Windows
[
]
\w
+
[
]
(?&ver)
)
(?P<os_linux>
Linux
(?:
[
]
(?:
i686
|
x86_64
)
)?
)
(?P<os_macintosh>
Macintosh
)
(?P<os_ios>
(?:
CPU
[
]
)?
iPhone
[
]
OS
|
CPU
[
]
OS
.
*
?
like
[
]
Mac
[
]
OS
[
]
X
)
(?P<device>
(?&device_ios)
|
(?&device_firefox)
|
(?&device_android)
)
(?P<device_ios>
iPhone
|
iPad
)
(?P<device_firefox>
Mobile
)
(?P<device_android>
Android
(?:
[
]
(?&ver)
)?
)
(?P<browser>
(?:
(?&browser_ie)
|
(?&browser_safari)
|
(?&browser_chrome)
|
(?&browser_chromium)
|
(?&browser_firefox)
|
(?&browser_version)
#
|
(?&browser_nexus)
|
(?&browser_mobile)
|
(?&browser_gsa)
|
(?&browser_quicklook)
|
(?&browser_opera)
)
[
\/
]
(?:
[
A
-
Z
\d
]
+
\b
(?!
\.
)
|
(?&ver)
)
)
(?P<browser_safari>
(?:
Mobile
[
]
)?
Safari
)
(?P<browser_chrome>
Chrome
)
(?P<browser_chromium>
\b\w
+
\b
[
]
Chromium
)
(?P<browser_firefox>
Firefox
)
(?P<browser_ie>
MSIE
)
(?P<browser_version>
Version
)
(?P<browser_nexus>
Nexus
[
]
\d
+
[
]
Build
)
(?P<browser_mobile>
Mobile
)
(?P<browser_gsa>
GSA
)
(?P<browser_quicklook>
QuickLook
)
(?P<browser_opera>
OPR
)
)
^
(?:
(?=
.
*
?
(?P<Agent>
(?&agent)
)
)
)
(?:
(?=
.
*
?
(?P<OS>
(?&os)
)
)
)
(?:
(?=
.
*
?
(?P<Device>
(?&device)
)
)
)?
(?:
(?=
.
*
?
(?P<Browser>
(?&browser)
(?:
[
]
(?&browser)
)*
)
)
)?
/
gmx
Open regex in editor
Description
From a (fairly large) list of User Agent strings, extract the OS, Browser, and Device Type.
Submitted by
OnlineCop
-
10 years ago
(Last modified a year ago)