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,080 community submitted regex patterns...
1
LiveRes
PCRE (PHP <7.3)
Postcode Validation
Submitted by
Dan Manning
-
8 years ago
1
Email
PCRE (PHP <7.3)
Requires any character, @ sign and a period in the extension of the email address
Submitted by
anonymous
-
8 years ago
1
Poedit Translation
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
1
comma in brackets
PCRE (PHP <7.3)
select all comma in brackets
Submitted by
the-dreamer
-
8 years ago
1
Capturing URL tester
PCRE (PHP <7.3)
This pcre style regex tests for valid URLs capturing the whole address. It will capture http and https only. Compatible with multiple sub-domains and raw IPV4 addresses, as well as paths, queries, and parameters. See below for examples: Will match these valid URLS: https://www.example.com/foo/?bar...
Submitted by
1nc3p710n
-
8 years ago
1
Meta book descr
PCRE (PHP <7.3)
validate book desctiption
Submitted by
anonymous
-
8 years ago
1
Simple Url Matcher
PCRE (PHP <7.3)
Simple url matcher catches most urls users enter
Submitted by
kristian epps
-
8 years ago
1
BUNGALOW EXTRA SERVICES
PCRE (PHP <7.3)
no description available
Submitted by
GVEILLEUR
-
8 years ago
1
Simple Email
PCRE (PHP <7.3)
Verify email : a.b@c.d
Submitted by
Smiley32
-
8 years ago
1
Test
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
1
Vérifie un numéro de téléphone (français)
PCRE (PHP <7.3)
Vérifie un numéro de téléphone (français) : 0630848239 --> ok 06.30.84.82.39 --> ok 06-30-84-82-39 --> ok 06 30 84 82 39 --> ok +33630848239 --> ok...
Submitted by
Smiley32
-
8 years ago
1
Add ons prices
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
1
JS - Url script name
PCRE (PHP <7.3)
Get the script name from an url without extension and version number
Submitted by
vrashq
-
8 years ago
1
validación de correo electrónico
PCRE (PHP <7.3)
no description available
Submitted by
arkosnoemarenom
-
8 years ago
1
rat
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
1
Windows command line
PCRE (PHP <7.3)
no description available
Submitted by
Christoph P.
-
8 years ago
1
BUNGALOW NL MODEL V 2 PRICE CAPTURE
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
8 years ago
1
MD link to html
PCRE (PHP <7.3)
no description available
Submitted by
cr
-
8 years ago
1
regex tel mobile fr
PCRE (PHP <7.3)
no description available
Submitted by
talipcr
-
8 years ago
1
Pushjet UUID Match
PCRE (PHP <7.3)
Matches a valid Pushjet UUID
Submitted by
anonymous
-
8 years ago
1
...
470
471
472
473
474
...
604
Parsing browser User Agents
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)