Regular Expressions 101

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
((?<!\d|\.)([0-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?!\d|\.) *[,;] *){3}(?<!\d|\.)([0-9]?[0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(?!\d|\.)
/
gi

Description

Color RGBA in shape : 255, 255, 255, 255 ',' or ';' are accepted

Submitted by theBlueBisu - 9 years ago