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 14,200 community submitted regex patterns...
0
get all digits in sequence
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
Detect helm charts directory
PCRE (PHP <7.3)
no description available
Submitted by
ducthinh993@gmail.com
-
4 years ago
0
Test
PCRE (PHP <7.3)
TEst
Submitted by
Zac
-
4 years ago
0
Get Hash Tags from tweet
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
elektro cnpj
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
elektro modalidade
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
elextro grupo
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
elektro total
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
European home adresse
PCRE (PHP <7.3)
Find european address (France, Italy, Suisse, Germany)
Submitted by
Anthony Chaussin
-
4 years ago
0
split_Path
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
split_amazon_URI
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
(Last modified 3 years ago)
0
Date Range
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
Viemo regex
Python
no description available
Submitted by
anonymous
-
4 years ago
0
QDP - NoBcAl
PCRE2 (PHP >=7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
WORD WRAP lines over 80 characters long
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
Add space after comma if it has letters on each side.
PCRE (PHP <7.3)
This is used in the SQL_Pretty_Formatter after the commas inside quotes, parenthesis, and brackets have been temporarily replaced with |.
Submitted by
Ben
-
4 years ago
0
Negative lookahead with example
PCRE (PHP <7.3)
This text won\'t match because it does contain ab in it! This text won\'t match because it does contain cd in it! This text matches because it doesn\'t contain them in itghdfgdfg!
Submitted by
jarea
-
4 years ago
0
LOS Number
Python
no description available
Submitted by
anonymous
-
4 years ago
0
vin
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
4 years ago
0
Find next line if currentline match pattern
PCRE (PHP <7.3)
useful to find when values are repeating in input
Submitted by
anonymous
-
4 years ago
1
...
583
584
585
586
587
...
710
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)