The purpose of this tutorial is to show you how to use regular expression. Learning this can help locate snipets of code with almost all programming languages. You can use these to find certain combinations within a string. I will be using this gist to identify some of these expressions.
/^#?([a-f0-9]{6}|[a-f0-9]{3})$/
This regular expression is used to match Hex Values. All of this will be broken down, and I will be explaining how these are used in this particular Regex. You can use this site to help further your understanding of Regex https://regexr.com/