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
Community Patterns
Search among 5,680 community submitted regex patterns...
0
walter1976Split
Python
walter1976Split
Submitted by
anonymous
-
a year ago
0
Commafication (this BREAKS ON APPLE DEVICES!!!!)
ECMAScript (JavaScript)
Commafy any number! 30000 = 30,000 303123 = 303,123 999888777 = 999,888,777
Submitted by
Mendel Groner
-
a year ago
0
SparkplugB Topic Pattern
Python
SparkplugB has a specific pattern to the MQTT topic string. Included here is the convention of metrics as a continuation of the topic string (although as an element in the binary payload it is not!)
Submitted by
null-directory
-
a year ago
0
auto-gpt command google
Python
auto-gpt command google returned
Submitted by
anonymous
-
a year ago
0
匹配限定后缀名的文件,忽略大小写
Golang
匹配.mka后缀名的文件,忽略大小写
Submitted by
anonymous
-
a year ago
0
匹配限定后缀名中的指定关键字,忽略大小写
Golang
匹配.mkv和.mp4后缀名中包含menu或sp或.sample,忽略大小写
Submitted by
anonymous
-
a year ago
(Last modified a year ago)
0
hsl colors
ECMAScript (JavaScript)
matches many HSL and HSLA formats permitted in CSS
Submitted by
anonymous
-
a year ago
0
auto-gpt- parse system cmd
Python
auto-gpt- parse system cmd
Submitted by
anonymous
-
a year ago
1
golang re2 negative lookahead
Golang
Aquivalent solution for golang's unsupported negative lookahead in re2 flavor of go's regex. This example provides a negative lookahead similar to (?!/api/) ignoring routes with the /api/ prefix at the start.
Submitted by
misha
-
a year ago
0
autogpt-parse next-action
Python
autogpt-parse next-action
Submitted by
anonymous
-
a year ago
0
auto-gpt-parse next-action
Python
auto-gpt-parse next-action
Submitted by
anonymous
-
a year ago
0
auto-gpt-THOUGHTS block
Python
auto-gpt-THOUGHTS block
Submitted by
anonymous
-
a year ago
0
autogpt-system-command-parse
Python
autogpt-system-command-parse
Submitted by
anonymous
-
a year ago
0
Extract email from - Add "email"
ECMAScript (JavaScript)
Replace Add "xyz@abc.com" with xyz@abc.com
Submitted by
anonymous
-
a year ago
0
Email address supporting plus addressing and multiple subdomains.
ECMAScript (JavaScript)
This expression follows the rules displayed at https://knowledge.validity.com/hc/en-us/articles/220560587-What-are-the-rules-for-email-address-syntax-. Note that their rules DO NOT exactly match those of the applicable RFC 5322 (sections 3.2.3 and 3.4.1) and RFC 5321, but rather supports a pattern ...
Submitted by
Eric Bewley
-
a year ago
0
Extract structure from dates
Python
1-12 / 2022
Submitted by
anonymous
-
a year ago
0
tacacs legacy server definition: sentence and parts
Python
This query extract the entire tacacs legacy configuration by servers and divide its parts on groups
Submitted by
anonymous
-
a year ago
0
auto-gpt capture command
Python
auto-gpt capture command
Submitted by
anonymous
-
a year ago
0
trimming whitespaces from the beginning and from the end
Python
trimming whitespaces from the beginning and from the end
Submitted by
anonymous
-
a year ago
0
Filename without extension
ECMAScript (JavaScript)
Selects only the filename of a file, including dotfiles.
Submitted by
anonymous
-
a year ago
1
...
9
10
11
12
13
...
284
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)