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 18,020 community submitted regex patterns...
83
Distinguish torrent files (series vs movies)
Python
A neat regex for finding out whether a given torrent name is a series or a movie. Returns the full name of the series with the separator needed to make it pretty (ie, replace it with space or what you want). Also returns the season number or the year for the movie/series, depending on what was prev...
Submitted by
Firas Dib
-
10 years ago
(Last modified a year ago)
13
US Currency Format
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
9
Fixo LDN CSP e SEM CSP
PCRE (PHP <7.3)
no description available
Submitted by
Marcos Müller
-
10 years ago
483
regex101.com permalink id grabber
PCRE (PHP <7.3)
Grabs the ID for the regex101.com permalink code. If a revision number is provided, grab that as well.
Submitted by
chris mccoy
-
11 years ago
(Last modified 7 months ago)
238
Matching email addresses per RFC5322
PCRE (PHP <7.3)
The BNF rules from RFC 5322 transformed to PCRE by Nikita Popov and described in the post http://nikic.github.io/2012/06/15/The-true-power-of-regular-expressions.html.
Submitted by
Michael Musson
-
11 years ago
10
MikroTik FireWall
PCRE (PHP <7.3)
Regex used in Splunk to extract fields from Mikrotik FW. NOTES: Mikrotik must be configured to use "BSD Syslog" format FW rules must add, as log prefix, the action: drop accep...
Submitted by
HappyIdeasMaker
-
9 years ago
10
If-Then-Else Conditionals
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
10
money: either 0 or 2 dp
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
11
remove comments from php code
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
9 years ago
13
Match Gmail Email
Recommended
PCRE (PHP <7.3)
Match Gmail Email
Submitted by
Óscar EnrÃquez
-
10 years ago
13
Credit Card Expiry Date
ECMAScript (JavaScript)
Allows inserting expiry date as MM/YYYY or MM-YYYY format
Submitted by
Rider
-
9 years ago
12
Full url parse, domain, path, params
ECMAScript (JavaScript)
no description available
Submitted by
anonymous
-
9 years ago
5
Find All Python imports
PCRE (PHP <7.3)
no description available
Submitted by
anonymous
-
10 years ago
5
relative to absolute
PCRE (PHP <7.3)
relative to absolute
Submitted by
xp_prg
-
10 years ago
5
Quartz Cron Validation
PCRE (PHP <7.3)
http://stackoverflow.com/questions/2362985/verifying-a-cron-expression-is-valid-in-java
Submitted by
anonymous
-
9 years ago
5
Variable name of code
PCRE (PHP <7.3)
To get a variable name from a source code: The variable name is before the '=' (equal sign) This is the way to detect. Problem: Only 1 variable can get from 1 line. Unfortunately, this can get variable between after "//" and before ";" too. I made this for fake script debugger. Just get variable f...
Submitted by
Setsuna
-
9 years ago
5
Codice fiscale italiano
PCRE (PHP <7.3)
Oltre a supportare le omocodie controlla in modo restrittivo il carattere relativo al mese di nascita
Submitted by
Aldo Medri
-
9 years ago
5
import url image
Python
import url image
Submitted by
bartimeys
-
9 years ago
5
look for any $_POST['name']
PCRE (PHP <7.3)
if you are as lazy as me and want to replace every "=$_POST['name'];" using Dreamweaver or any development tool that allows using regular expressions to search in current file/document.
Submitted by
Kevinator
-
9 years ago
5
Form Tag
Python
Form Tag
Submitted by
Jay Patel
-
9 years ago
1
2
3
4
...
901
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)