Supported Metacharacters
JavaScript supports the metacharacters and metasequences listed in Table 38 through Table 42. For expanded definitions of each metacharacter, see "Regex Metacharacters, Modes, and Constructs.”
Table 1-38. JavaScript character representations
Sequence | Meaning |
|---|---|
| Null character, |
| Backspace, |
| Newline, |
| Carriage return, |
| Form feed, |
| Horizontal tab, |
| Vertical tab, |
| Character specified by a two-digit hexadecimal code. |
| Character specified by a four-digit hexadecimal code. |
| Named control character. |
Table 1-39. JavaScript character classes and class-like constructs
Class | Meaning |
|---|---|
| A single character listed, or contained within a listed range. |
| A single character not listed, and not contained within a listed range. |
| Any character except a line terminator, |
| Word character, |
| Nonword character, |
| Digit character, |
| Nondigit character, |
| Whitespace character. |
| Nonwhitespace character. |
Table 1-40. JavaScript anchors and other zero-width tests
Sequence | Meaning |
|---|---|
| Start of string, or the point after any newline if in multiline match mode, |
| End of search string, or the point before a string-ending newline, or before any newline if in multiline match mode, |
| Word boundary. |
| Not-word-boundary. |
| Positive lookahead. |
| Negative lookahead. |
Table 1-41. JavaScript mode modifiers
Modifier | Meaning |
|---|---|
|
|