Skip to content

Instantly share code, notes, and snippets.

View dltorrise's full-sized avatar
🍊
Just life

dltorrise

🍊
Just life
View GitHub Profile
@dltorrise
dltorrise / gist-template.md
Last active May 9, 2023 03:14
This is a tutorial on regular expressions

RegExr Tutorial - Hex Codes

RegExr stands for Regular Expressions. A regular expression is a pattern of charaters used to define a search pattern. This will find a specific type of characters. RegEx is universal among coding languages.

Summary

In this tutorial, I will be describing how to match a hex value with a regular expression. A hex value is a color that is expressed in a hexadecimal value. This comes in the form of number sign (#) and either 3 or 6 digits between 0 and 9 or letters between a and f.

Here is an example of a regular expression that would match a hex value: