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,380 community submitted regex patterns...
1
Russian phone number validater
PCRE (PHP <7.3)
Russian phone number validater
Submitted by
Russell of sitesoft
-
9 years ago
1
https://www.facebook.com/video.php?v=1009222819122586
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
match start of line subsubsection
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
parse table
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
url regex
PCRE (PHP <7.3)
spoon library
Submitted by
anonymous
-
9 years ago
1
french phone number
PCRE (PHP <7.3)
french phone number
Submitted by
lolo64
-
9 years ago
1
simple json key -value
PCRE (PHP <7.3)
simple json key -value parser
Submitted by
ReMMeR
-
9 years ago
1
basic emails with separator
PCRE (PHP <7.3)
infinite emails with ; separator a@b.c;a@b.c;a@b.c;a@b.c;a@b.c
Submitted by
gcolciago
-
9 years ago
1
not a character and not spaces
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
tablespace_Skipper
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
Phone numbers - Poland
PCRE (PHP <7.3)
Validates following phone number schemes: 1234567 123-45-67 12-34-578 711234567 0711234567...
Submitted by
Forseti
-
9 years ago
1
Email validation
PCRE (PHP <7.3)
Usernames with dots, dashes and underscores. Hostnames limited to 64 chars, dash disallowed at first char of domain segment, only one consecutive dash or dot, one-char domains possible, multi-subdomains, long TLDs.
Submitted by
Forseti
-
9 years ago
1
Names with hyphens or single quotes
PCRE (PHP <7.3)
Names that accept maximum of 1 hyphen or 1 Quote, does not allow white spaces, allows an unlimited length of name.
Submitted by
chakra_tavy
-
9 years ago
1
Extract variable data from multi-line text columns
PCRE (PHP <7.3)
Pulls data from the 3rd line of different columns of text.
Submitted by
Jan from StackOverflow, and John Kimball
-
9 years ago
1
Dutch postcode validation
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
Credit Card Regex
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
replace divs
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
1
file name without extension
PCRE (PHP <7.3)
no description available
Submitted by
sl
-
9 years ago
1
Isolate string in double or single quotes
PCRE (PHP <7.3)
Isolate strings inside double or single quotes
Submitted by
garsax
-
9 years ago
1
10-digit phone number with hyphens
PCRE (PHP <7.3)
Such as 333-333-1234. Does not test for valid sequences of digits. E.g. 000-000-0000 would pass.
Submitted by
anonymous
-
9 years ago
1
...
583
584
585
586
587
...
619
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)