Skip to content

Instantly share code, notes, and snippets.

View egarrisxn's full-sized avatar

Ethan G. egarrisxn

View GitHub Profile
@egarrisxn
egarrisxn / my-regex-tutorial.md
Created April 24, 2024 15:51
This is a tutorial that explains how a specific regular expression, or regex, functions by breaking down and describing each part of the expression.

My Regex Tutorial!

This tutorial on Regular Expression (Regex) aims to assist you in comprehending and establishing the order of unique characters for validating a search term. A Regex refers to a sequence of characters that outlines a particular search pattern. Whether incorporated into code or search algorithm, regular expressions enable the identification of specific character patterns within a string, as well as the identification and substitution of individual characters or sequences of characters within a string. Moreover, they are commonly employed for validating input data.

Summary

This tutorial will show you how to harness the power of regular expressions to manipulate text based on specific patterns.

Let us explore how to utilize regex for matching emails using the expression /^([a-z0-9_.-]+)@([\da-z.-]+).([a-z.]{2,6})$.