How to Validate Emails with Regex

Updated January 12, 2021

What are regular expressions (regex)?

A regular expression, which is commonly shortened to "regex" or "regexp", is a set of characters that define search pattern. You can think of them as a string of letters, numbers, and symbols that can be used to search and/or validate another given string. Regular expressions have many applications across computing. They can be used to find and process text, such as in search engines and text editors. However, their power comes from their flexibility. They can be made to do a variety of things... including validating emails!