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,120 community submitted regex patterns...
2
Simple @user replacement
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
2
credit card
PCRE (PHP <7.3)
Based on http://www.regular-expressions.info/creditcard.html This example includes test strings. This only validates the pattern, and not whether the credit card number passes a checksum validation. See the Luhn algorithm for details https://en.wikipedia.org/wiki/Luhn_algorithm...
Submitted by
Steve Piercy
-
9 years ago
2
Function Parameter Switcher
PCRE (PHP <7.3)
Switches the order of two functions in a parameter.
Submitted by
anonymous
-
9 years ago
2
better orf finder
PCRE (PHP <7.3)
don't use my older one
Submitted by
tnrich
-
9 years ago
2
JSON BizTalk schema output
PCRE (PHP <7.3)
To convert the BizTalk schema output to one string
Submitted by
Emiel Kool
-
9 years ago
2
Valmaks_rename_big_strings
PCRE (PHP <7.3)
no description available
Submitted by
witamin
-
9 years ago
2
remove n lines after matching pattern
PCRE (PHP <7.3)
stackoverflow question
Submitted by
irom77
-
9 years ago
2
inline img
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
2
Match 3 Repeating Numbers
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
2
WindowsUpdate.log Line Breaker
PCRE (PHP <7.3)
This regex defines the end and the beginning of a WindowsUpdate.log event.
Submitted by
Dion Pezzimenti
-
9 years ago
2
Beautiful Regex for detecting Slack URL's
PCRE (PHP <7.3)
just lovely
Submitted by
the boiz aka ben and chris
-
9 years ago
2
Password Log
PCRE (PHP <7.3)
Matches a password that has been passed in as a url query parameter or in a post dictionary.
Submitted by
Anthony Miller
-
9 years ago
2
File name without extension from linux path
PCRE (PHP <7.3)
If given a linux file path match the filename without the extension. It extracts FileNameWithoutExtension into its own match group so that you can use it in things like Logstash Grok.
Submitted by
Chris Magnuson, by combining other peoples starting points
-
9 years ago
2
update match
PCRE (PHP <7.3)
no description available
Submitted by
ozarzu
-
9 years ago
2
English-Hungarian (non-/)obfuscated email adresses
PCRE (PHP <7.3)
Finds email addresses even when cleverly obfuscated in both english and hungarian
Submitted by
WolfyD
-
9 years ago
2
mask the credit card number
PCRE (PHP <7.3)
no description available
Submitted by
vj
-
9 years ago
2
Get consecutive capitalized words
PCRE (PHP <7.3)
"Bank Negara Malaysia", "1Malaysia Development Bhd"
Submitted by
aizu
-
9 years ago
2
5
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
2
Any variable between @
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
2
Iranian National Code Pattern
PCRE (PHP <7.3)
Iranian National Code aka Code Melli
Submitted by
Saeed Tabrizi
-
9 years ago
1
...
583
584
585
586
587
...
606
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)