Skip to content

Instantly share code, notes, and snippets.

@albenchris
albenchris / emailRegex.md
Created April 11, 2021 17:14
Email RegEx Tutorial

Email RegEx Tutorial

RegEx (Regular Expressions) can be one of the many steps apps take to validate information users are entering into the database. At first glance, they may look like a toddler got a hold of a keyboard, but there is a method to the expressions that can be easy to understand with the right resources along with some practice.

Summary

In this tutorial, we will be looking at regex expressions that validate emails.

These could look like:

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