Java regex hex color code
This article shows how to use regex to validate a hex color code. Regex for hex color code. ^#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$ Regex explanation ^ # start of the line # # start with a number sign `#` ( # start of (group 1) [a-fA-F0-9]{6} # support z-f, A-F and 0-9, with a length of 6 | # …