A regular expression, regex for short, is a series of characters that are used to identify certain pattern criteria. for the remainder of this tutorial I will be referring to regular expressions simply as regex. Regex are beneficial in coding for their ease of use across multiple programming languages, for tasks such as validations, finding strings, and replacing strings, etc. In this tutorial I will break down how we use regex to match an email.
this tutorial will focus on the following regex: /^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/
This regex can be used to verify an email address. In this tutorial I will breakdowm this regex's indidviual components to give us a better understanding of how regex work and how they can make our lives easier.