Regular Expressions 101

Sponsors

Library entries

-1
javascript

Passwords

no description available
Submitted by anonymous - 5 years ago
-1
javascript

Discord Emojis

no description available
Submitted by anonymous - 5 years ago
-1
javascript

Email validation

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

Breakdown of this/that

no description available
Submitted by anonymous - 2 years ago
-1
python

IP Address

no description available
Submitted by anonymous - 2 years ago
-1
javascript

Any combo of space and dash

no description available
Submitted by anonymous - 2 years ago
-1
javascript

Slug

no description available
Submitted by anonymous - 2 years ago
-2
javascript

non-negative integer

repeat ... refactor
Submitted by jay johnson - 9 years ago
-2
javascript

email

no description available
Submitted by anonymous - 9 years ago
-2
javascript

Select ID from regex101 URL

no description available
Submitted by Vinay - 8 years ago
-2
javascript

Header `Link` validator

no description available
Submitted by Vaseker - 8 years ago
-2
javascript

Matching HTML attributes

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

example

match
Submitted by anonymous - 8 years ago
-2
python

eee

no description available
Submitted by anonymous - 8 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