Regular Expressions 101

Community Patterns

Regex to Match Valid Hex Color Values in CSS

1

Regular Expression
Python

r"
[\w :,]+(#(?:[a-fA-F0-9]{3}|[a-fA-F0-9]{6}))\b
"
g

Description

no description available

Submitted by Prayash Mohapatra - 8 years ago