$ ./guess_the_languageRegex
Regex · medium · #54

Which input does this color pattern match?

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