Which input does this color pattern match?
/^#([0-9a-f]{3}){1,2}$/i
- "#FFF"
- "#ggg"
- "#12345"
- "FFF000"
It accepts
Play Regex ▸
# followed by 3 or 6 hex digits; the i flag allows uppercase.