Regular Expressions 101

Community Patterns

0

SUBTOTAL

Python
SUBTOTAL 15.88
Submitted by KRISHNA - a year ago
0

CPF|CNPJ

Python
Match Brazilian documents
Submitted by Bacco - a year ago
0

恩更

Python
非法发
Submitted by anonymous - a year ago
0

dice thing

Python
Stuff for a dnd thing
Submitted by Cata - a year ago

Check if string matches a valid CSS color (hex, rgb, rgba, hsl, hsla)

1

Regular Expression
ECMAScript (JavaScript)

/
^#(?:[\da-f]{3}){1,2}$|^#(?:[\da-f]{4}){1,2}$|(rgb|hsl)a?\((\s*-?\d+%?\s*,){2}(\s*-?\d+%?\s*)\)|(rgb|hsl)a?\((\s*-?\d+%?\s*,){3}\s*(0|(0?\.\d+)|1)\)
/
gmi

Description

Loading markdown...
Submitted by Ioannis Potouridis - 5 years ago