Regular Expressions 101

Sponsors

Library entries

0
dotnet

URL

(@url)([\s]=[\s])(?:')(.)(?:')(?:;)
Submitted by anonymous - 20 hours ago
0
pcre2

Strip datetime -> date

Strip datetime -> date
Submitted by anonymous - a day ago
0
pcre2

Sports Release Regex attempt #1

Yes. Its a thing.
Submitted by anonymous - a day ago
0
pcre2

matches 4 or 6 or 8 digit which might be otp

test
Submitted by test - 2 days ago
1
javascript

Regex for url

Regex for url
Submitted by anonymous - 3 days ago
0
pcre2

InputInteger

InputInteger
Submitted by anonymous - 4 days ago
0
pcre2

hidrologia

qualidade
Submitted by anonymous - 4 days ago
1
javascript

RegEX IBAN SEPA with spaces

RegEX IBAN SEPA with spaces
Submitted by Karim MB - 5 days 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