Are You Freaking Out Yet?
Using a backslash before a special character is called escaping that character. This will match ". Because of the brackets, the entered string can have either a period or a dash here, but not both.
The closing parenthesis says that this is the end of the group. We've given it the name re so that when we use it later, we'll remember that it's a regular expression.
Keep this in mind when debugging scripts that use regular expressions. We then have another group within a set of parentheses: The HTML for the email validation example. The former has 27 lines of code; the latter, only four.
The opening parenthesis signifies a group. First, re is just a variable.