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 5,900 community submitted regex patterns...
1
Don't match numbers longer than 5 length
Python
using ^ and $
Submitted by
anonymous
-
3 years ago
1
Parse CISCO NEXUS 9xxx/5xxxx show inventory output w/o | json modifier
Python
Parse CISCO NEXUS 9xxx/5xxxx show inventory output w/o | json modifier. Nexus 9xxxx don't have the json output modifier. It's a LINUX based os, so | json would fork a json binary which doesn't exist
Submitted by
skalef
-
3 years ago
(Last modified 3 years ago)
1
Valid RGB color value
ECMAScript (JavaScript)
Pattern for matching actually valid RGB values. validate separator (mixing spaces and commas between values is not valid) validate if comma is used as separator if alpha channel is set validate units (mixing percentage with integers is not valid) extract r, g, b, a, separator and unit with named gr...
Submitted by
BorisTB
-
3 years ago
(Last modified 3 years ago)
1
Match Windows filename in any path but only C: D: and F: drives
Java 8
Used for Service Discovery in vRealize Operations. Use case is a service that can be installed on any path, but we only want to discover and monitor services installed on standard production drives (C, D or F). Filename will always be the same.
Submitted by
Various
-
3 years ago
1
ss001
Python
Rep
Submitted by
anonymous
-
3 years ago
1
hashtag
ECMAScript (JavaScript)
gfhgfhghfg
Submitted by
anonymous
-
3 years ago
1
Email Address subdomains support
ECMAScript (JavaScript)
It checks email addresses supporting subdomains name@gmail.com name.surname@fda.gov name_surmna05@kernel.org name-surname@redaktion.derspiegel.de...
Submitted by
anonymous
-
3 years ago
1
11
Java 8
11
Submitted by
11
-
3 years ago
1
Parse URLs
Python
A regular expression to parse URLs. Complete with comments.
Submitted by
D. Torres
-
3 years ago
1
Currency amount validation with sign (cents optional)
ECMAScript (JavaScript)
Allows Number: Currency amount US (cents optional) Can use US-style 123,456.78 notation Optional thousands separators; optional two-digit fraction; commas; dollar sign
Submitted by
NatZol
-
3 years ago
1
1
ECMAScript (JavaScript)
1
Submitted by
anonymous
-
3 years ago
1
Remove HTML tags and comments
Python
Remove HTML tags and comments
Submitted by
Smit Patel
-
3 years ago
1
Parse Kubernetes Resource URI Paths
Golang
This regex extracts Kubernetes Resource URIs. Copyright 2021 Mathew Wicks Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License....
Submitted by
Mathew Wicks
-
3 years ago
1
Monkaa Dataset
Python
Parses Monkaa dataset filenames and extracts all the relevant labels
Submitted by
IP
-
3 years ago
1
match INTEGER val in range [0 ,32767] for unsigned val and [-32768,-1] for signed val
Python
"(^-?)(3276[0-8]$|327[0-5]?[0-9]$|320-6?[0-9]$|3[0-1]?[0-9]?[0-9]?[0-9]$|[0-2]?[0-9]?[0-9]?[0-9]?[0-9]$)"gm
Submitted by
issam-seghir
-
3 years ago
(Last modified 3 years ago)
1
Track1 credit card dump
ECMAScript (JavaScript)
Captures group that is either AMEX, MC, or Visa with or without start and end sentinels including discretionary data after section for name Does not support 13 digit credit cards, as they are not used anymore. Only allows for 15 digit AMEX and 16 digit Visa or MC
Submitted by
BigDad
-
2 years ago
1
IPv4 + TCP-Port
Java 8
This regex matches a IPv4 with a TCP Port (1-65535) Example: 192.168.0.69:1337 will match and have the groups: Group 1: 192.168.0.69 Group 2: 1337
Submitted by
SIMULATAN
-
2 years ago
1
Minecraft Log Parser 1.0
ECMAScript (JavaScript)
Improvements needed
Submitted by
Crystal
-
2 years ago
1
SharePoint On-Premises Validator
ECMAScript (JavaScript)
SharePoint On-Premises Validator
Submitted by
anonymous
-
2 years ago
1
Numbers only (including decimals) ( JS work fine)
ECMAScript (JavaScript)
Rejects first symbol if 0 and all other non number (doesn't includes .123 )
Submitted by
Sofitt
-
2 years ago
(Last modified 2 years ago)
1
...
254
255
256
257
258
...
295
Valid RGB color value
1
Regular Expression
ECMAScript (JavaScript)
/
^
rgba
?
\(
(?:
\s
+
)?
(?<r>
\d
+
(?<unit>
%
?
)
)
(?:
\s
+
)?
(?<separator>
[
\s
|,
]
)
(?:
\s
+
)?
(?<g>
\d
+
\k<unit>
)
(?:
\s
+
)?
\k<separator>
(?:
\s
+
)?
(?<b>
\d
+
\k<unit>
)
(?:
\s
+
)?
(?:
(?<=
(?:
,
.
+
)
)
(?:
,
(?:
\s
+
)?
(?<a>
(?:
\d
+
)?
(?:
\.
?
\d
+
)
)
)?
(?:
\s
+
)?
)?
\)
$
/
gm
Open regex in editor
Description
Pattern for matching actually valid RGB values.
validate separator (mixing spaces and commas between values is not valid)
validate if comma is used as separator if alpha channel is set
validate units (mixing percentage with integers is not valid)
extract
r
,
g
,
b
,
a
,
separator
and
unit
with named groups
Submitted by
BorisTB
-
3 years ago
(Last modified 3 years ago)