Online
 
Friday, 21 November 2008
 
 

JavaScript - Literal characters | Print |  E-Mail
 

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)

Comment an article
  Name
  E-mail
   Title
Available characters: 4000
 Notify me of follow-up comments
This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see:

No comment posted

Rokok Kretek Jumbo Coklat

“Terbuat dari tembakau, saos dan cengkeh pilihan kwalitas tinggi sehingga menghasilkan rokok dengan rasa yang cocok untuk segala cuaca”
Jumbo Coklat - Powered By G-Ads

 
Top! Top!