A regular expression (regex) is a sequence of characters that defines a search pattern for a body of text. Regex are not programming-language specific objects. Regex consist of metacharacters and literals. Metacharacters are special characters, and literals are all other standard characters.
In JavaScript, a regex can be created using literal notation, which requires wrapping the the regex in forward slash characters (/) or by using a RegExp() constructor.
In this tutorial, I will describe the regex used for matching an email address.