Regular Expressions 101

Sponsors

Library entries

0
javascript

html img tag src

get src url from img tag in html
Submitted by anonymous - 7 years ago
0
javascript

space

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

ipv4 address

no description available
Submitted by Xiaohui Xu - 7 years ago
0
javascript

isDate

Validador de Data e Hora
Submitted by Rafael Fischer - 7 years ago
0
javascript

lookahead not match 'aa'

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

Phone number

no description available
Submitted by Vaseker - 7 years ago
0
javascript

author from tag

no description available
Submitted by imilov - 7 years ago
0
javascript

parse author from html

no description available
Submitted by imilov - 7 years ago
0
javascript

Finding norwegian address

no description available
Submitted by Håkon Antonsen - 7 years ago
0
javascript

Azeri full name js validation

no description available
Submitted by Noone - 7 years ago
0
javascript

CEP

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