Below, we'll be breaking down a regular expression used to match emails in order to develop our understanding of regular expressions.
The following regular expression can be used to match an email in a string:
/^([a-z0-9_\.-]+)@([\da-z\.-]+)\.([a-z\.]{2,6})$/
Emails are always made up of three components, which makes them fairly simple to write a search regex for.