Common escape characters for Java

Source: Internet
Author: User

The following is a common escape character comparison table:

The letter preceded by a "\" to denote the common ASCII characters that cannot be displayed. Called an escape character. such as \0,\t,\n, is called an escape character.

\ r \ t horizontal tab (HT) (Skip to next tab position) 00 9
escape character meaning ASCII code value (decimal)
\a Bell (BEL) 00 7
\b backspace (BS), move the current position to the previous column 008
\f page Break (FF), the current Position moves to the beginning of the next page 012
\ n line break (LF), move the current position to the beginning of the next line 010
Enter (CR) to move the current position to the beginning of the bank 013
\v vertical tab (VT) 011
\ represents a backslash character ' \ ' 092
\ ' represents a single quotation mark (apostrophe) character 039
\ " represents a double quote word Characters 034
/ null character (NULL) all
\ddd 1 to Any character represented by a 3-bit octal number three-bit octal
\xhh 1 to 2-bit hexadecimal any character represented by two-bit hex
Note: Differentiate, Slash: "/" with backslash: "\", not interchangeable here

Transfer from: http://www.cnblogs.com/DreamDrive/p/4676534.html

Where the escape character is most likely to be the two backslash "\ \" Identifies the path problem, and this way of representing the path is more in Windows, because the path under Linux is a slash "/" to represent.

If you want more detailed escape characters, you can refer to the official documentation: http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html

Common escape characters for Java

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.