Regular Expressions 101

Community Patterns

0

Other segment

Java 8
Other segments
Submitted by Lufram - 6 months ago
0

pxc plcnext

Golang
plcnext version strings
Submitted by anonymous - 6 months ago
0

awdwa

Java 8
dwa
Submitted by dwa - 6 months ago
0

IBAN

ECMAScript (JavaScript)
desc
Submitted by anonymous - 6 months ago
0

section headers

Java 8
ff
Submitted by ff - 6 months ago
0

Pick uuidValue from jSON payload

Java 8
.
Submitted by jeevan - 6 months ago
0

test everything

Java 8
hello
Submitted by anonymous - 5 months ago

html color match: transparent, #fff, #123456, rgb, rgba, hsl, hsla

11

Regular Expression
ECMAScript (JavaScript)

/
^(rgb\s*?\(\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?\))$|^(rgba\s*?\(\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(000|0?\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\s*?,\s*?(0|0\.\d*|1|1.0*)\s*?\))$|^(transparent)$|^(#([a-fA-F0-9]){3})$|^(#([a-fA-F0-9]){6}$)|(^hsl\s*?\(\s*?(000|0?\d{1,2}|[1-2]\d\d|3[0-5]\d|360)\s*?,\s*?(000|100|0?\d{2}|0?0?\d)%\s*?,\s*?(000|100|0?\d{2}|0?0?\d)%\s*?\)$)|(^hsla\s*?\(\s*?(000|0?\d{1,2}|[1-2]\d\d|3[0-5]\d|360)\s*?,\s*?(000|100|0?\d{2}|0?0?\d)%\s*?,\s*?(000|100|0?\d{2}|0?0?\d)%\s*?,\s*?(0|0\.\d*|1|1.0*)\s*?\)$)$
/

Description

Loading markdown...
Submitted by grouch - 9 years ago