Regular Expressions 101

Sponsors

Library entries

10
python

entity

no description available
Submitted by anonymous - 7 years ago
8
python

repeat group match

no description available
Submitted by anonymous - 7 years ago
8
python

domain - host

no description available
Submitted by anonymous - 7 years ago
7
python

CSS Import

no description available
Submitted by anonymous - 8 years ago
6
python

Find consecutive duplicate words

no description available
Submitted by anonymous - 7 years ago
5
python

Form Tag

Form Tag
Submitted by Jay Patel - 7 years ago
5
python

psswd

no description available
Submitted by anonymous - 7 years ago
5
python

Match Only Text

no description available
Submitted by anonymous - 6 years ago

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

Vote

11

Regular Expression
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 - 8 years ago