Community Patterns

Community Library Entry

0

Regular Expression
Created·2021-06-05 11:01
Flavor·PCRE2 (PHP)

/
rgba?\(\s*(25[0-5]|2[0-4]\d|1\d{1,2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{1,2}|\d\d?)\s*,\s*(25[0-5]|2[0-4]\d|1\d{1,2}|\d\d?)\s*,?\s*([01\.]\.?\d?)?\s*\)
/
gm
Open regex in editor

Description

This will parse and give you the values of an RGB or RGBA CSS style.

Submitted by Beau Beauchamp, WebTIGERS