Skip to content

Instantly share code, notes, and snippets.

@joellongaresjr
joellongaresjr / regex-email.md
Created August 22, 2023 08:43
Regex Tutorial: Regular Expressions for User Emails

Regex Tutorial: Identifying User Emails using Regular Expression

Greetings! Welcome to my tutorial on using Regular Expressions and how we can match "Regex Components" to specific patterns, in this case to User Emails! In this tutorial, I will be breaking down how this commonly used Regualr expression designed to match specific email addresses. I'll be going over the fundamental concepts of Regular expressions, and break down each component of the expression to further your knowledge on how it works!

Summary

In this tutorial I'll be reffering to this partciular regex pattern:

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

This particular regex pattern ensures that the provided string aligns with the structure of an email address.