Regular Expressions 101

Sponsors

Library entries

0
pcre

Time format

38 Seconds
Submitted by anonymous - 8 days ago
0
pcre2

Fetch Username and IP

Splunk
Submitted by anonymous - 8 days ago
0
pcre2

HTML Tag Selector

T
Submitted by Rahul - 8 days ago

Valid RGB color value

Vote

1

Regular Expression
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

Description

Loading markdown...
Submitted by BorisTB - 4 months ago