I\'m trying to write regex that extracts all hex colors from CSS code.
This is what I have now:
Code:
$css = <<
Shorter version of GolezTrol's answer that avoids writing the character set twice:
/#([a-fA-F0-9]{3}){1,2}\b/