Skip to content

Instantly share code, notes, and snippets.

View Sebastian2908-2007's full-sized avatar

TopDev Tech Sebastian2908-2007

View GitHub Profile
@Sebastian2908-2007
Sebastian2908-2007 / match-HTML-tag.md
Last active March 29, 2022 19:53
This gist breaks down the regex for matching an html tag.

Matching an HTML Tag – /^<([a-z]+)([^<]+)(?:>(.)</\1>|\s+/>)$/

Summary

/^<([a-z]+)([^<]+)(?:>(.)</\1>|\s+/>)$/ - the preceeding beuty matches an html tag!

Table of Contents

@Sebastian2908-2007
Sebastian2908-2007 / gist-template.md
Last active March 29, 2022 19:55
A gist about A regex Matching a Hex Value /^#?([a-f0-9]{6}|[a-f0-9]{3})$/

Regex (Matching a Hex Value – /^#?([a-f0-9]{6}|[a-f0-9]{3})$/)

Today it is your lucky day!!! I will bless you with the knowledge of the "Matching A Hex Value " Regular Expression! So have a seat get comfy and read on, be amazed at this knowledge bomb.

Summary

This regex /^#?([a-f0-9]{6}|[a-f0-9]{3})$/) will match a hex value in this tutorial we are going to break it down!

Table of Contents