Regular Expressions 101

Sponsors

Library entries

4
javascript

url

no description available
Submitted by anonymous - 7 years ago
4
javascript

Full e-mail validator

no description available
Submitted by anonymous - 7 years ago
4
javascript

Currency Formater Accept , & .

no description available
Submitted by anonymous - 7 years ago
4
javascript

Mobile phone russia

Submitted by Johhny - 7 years ago
4
python

import url image

import url image
Submitted by bartimeys - 7 years ago
4
javascript

vowel words

([!-\~]aeiou)
Submitted by Ipsita Mohanty - 7 years ago
4
javascript

extract domain with port

no description available
Submitted by yooresh - 7 years ago
4
javascript

UK Postcode

no description available
Submitted by msyed - 7 years ago
3
javascript

email

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

Capture Query Strings

A solution for capture query params.
Submitted by Rafael Laurindo - 6 years ago
3
python

Email

Python
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