Skip to content

Instantly share code, notes, and snippets.

@avuong19
avuong19 / README.md
Created June 19, 2022 08:53
Regex Tutorial: Matching an email

Regex Tutorial: Matching an email

This is a tutorial about Regex, or regular expression. What is Regex? Regex is a string of text that helps us create patterns in order to search for text. The following document will walk you through how to use Regex to match an email address.

Summary

We will use this Regex below for this example

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