Skip to content

Instantly share code, notes, and snippets.

View EmilioColds's full-sized avatar

Emilio Frías EmilioColds

View GitHub Profile
@EmilioColds
EmilioColds / matching-email-tutorial.md
Created April 29, 2024 21:03
Regex Tutorial for Matching an Email by Emilio Frías

Regex Tutorial for Matching an Email

For my first tutorial, the objective is to summarize the syntax and the different components that create a regex. For this tutorial, the regex example will be one that seeks to macth an email address. We will find out how this regex create a pattern, seeking to match any real life email address.

Summary

The regex that will be explained is the following:

/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/