Regular Expressions 101

Regex to Match Valid Hex Color Values in CSS

Open Workspace
  • Python
  • Match
1

Regular Expression

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

Description

No description provided.

Submitted by Prayash Mohapatra