Skip to content

Instantly share code, notes, and snippets.

@gtankha
gtankha / Regular_Expression_HEX_gt.md
Last active July 12, 2024 11:51
Regular Expressions - Match HEX Values

Regular Expression -- Match HEX Values

This file is intended to explain the details of how a specific regular expression works. This particular regular expression is used to match a HEX value. The description below will detail each component of the regular expression and how it works.

Summary

We will be evaluating the following regular expressions used to match HEX values:

/^#?([a-f0-9]{6}|[a-f0-9]{3})$/