Skip to content

Instantly share code, notes, and snippets.

View brownj47's full-sized avatar

Justus Brown brownj47

View GitHub Profile
@brownj47
brownj47 / regex.md
Last active August 17, 2022 06:13
A gist that breaks down how to parse a regex that finds emails

Parsing an Email with Regex

Regular expresssions are an important part of software development. They allow us to search for specififc patterns so that we can create more robust queries.

Summary

In this gist, I will break down how the regex below works. It allows a user to find and match emails.

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