Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Special character

Function

.

This will match any single character other than a newline

*

This matches zero or more consecutive characters. For example (/ba*) will match “ba” and “baaa” as the expression will match more than one “a” characters.

\

Escape following special character. This will allow special characters to be matched within the email. For example if you are looking for “[abc]” the regex will have to be \[abc\] as this will mean that the regex will also look for “[ ]” as a character.

( )

Used to define a capture group within a regex.

[ ]

This is used to define which Character sets you want to capture. For example ([a-z]) will capture all characters that are a lower case alphabetical character.

{ }

Indicates how many characters the value must have. This can be an exact number or between a certain range.

+

Matches one or more consecutive characters.

|

Matches either what is before or after the | allowing for a or condition