Skip to content

Instantly share code, notes, and snippets.

View joshuasamples2's full-sized avatar

joshuasamples2

View GitHub Profile

Regex Tutorial

On this tutorial I will be demonstrating how to match the hex value to the Regex. Regular Expressions or Regex for short is a sequence of characters that match a pattern in the text. The regex usually looks like gibberish, but it is a very useful tool to have in your toolbox.

Summary

I will be demonstrating how to evaluate regex to match hex values. Our example of code is /^#?([a-f0-9]{6}|[a-f0-9]{3})$/

Table of Contents