| JavaScript - Literal characters | | Print | |
Literal characters
Letters, numbers, and most other characters are literals in a regular expression: they simply match themselves. As we'll see in the sections that follow, however, there are a number of punctuation characters and escape sequences (beginning with \) that have special meanings. The simplest of these escape sequences provide alternative ways of representing literal characters:
|
Character |
Meaning |
|---|---|
|
\n, \r, \t |
Match literal newline, carriage return, tab |
|
\\, \/, \*,\+, \?, etc. |
Match a punctuation character literally, ignoring or escaping its special meaning |
|
\xnn |
The character with hexadecimal encoding nn. |
|
\uxxxx |
The Unicode character with hexadecimal encoding xxxx. |
This entry was posted on . You can follow any responses to this entry through the RSS 2.0 feed. You can leave a comment.
| Users' Comments (0) |
|
No comment posted





