Professional Documents
Culture Documents
newline '\n'
carriage return '\r'
tab '\t'
Whitespace '\s'
Null character '\0'
Form feed '\f'
ASCII character \nnn
Metacharacter Description
. Any single character
^ Match the beginning of a line
$ Match the end of a line
a|b Match either a or b
\d any digit
\D Any non-digit character
\w Any word character
\W Any non-word character
\s matches any whitespace character
\S Match any non-whitespace character
\b Matches a word boundary
\B Match must not occur on a \b boundary.
[\b] Backspace character
\xYY Match hex character YY
\ddd Octal character ddd
const emailRegex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]
{2,4}$/;