Regular Expressions 101

Community Patterns

RGB [0;255]

2

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

Description

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

Submitted by theBlueBisu - 8 years ago