RegEx to Match Hexidecimal color value

  • Requires the pound sign to precede the color value.
  • Allow 3 character "short code" version
  • Allows upper or lower case characters
^#(([a-fA-F0-9]){3}){1,2}$
Posted by
Snippet Viewed 1581 times.

Share your RegEx code snippets:

  • Get some recognition & link back to your site.

 

Submit | Browse

Most Recent regex snippets

Most Viewed