Java Escape character \\|

Source: Internet
Author: User
Tags control characters

http://blog.csdn.net/stewen_001/article/details/22871737

See a program

String t = "a| | b| | c| | D ";

string["temp = T.split ("\\|\\|"

System. out . println (Temp.length);

The main thing is: what does "\\|\\|" mean?

began a bit of a mask, and then a careful look to understand that the original is this:

\\ "\| In the escape is | \\||".

Deeper research:escape characters for Java

1. Eight binary escape sequence:\ + 1 To3 Guests5 number; Range' \000 ' ~ ' \377 ': null character
2.Unicode Escape Character:\u + four hexadecimal digits;0~65535 \u0000: null character
3. Special characters:3 x
\ ": Double quotation marks
\ ': Single quote
     \ \: Backslash
4. Control characters: 5
\ '   Single quote character
\\  backslash character
\r  carriage return
\n  line
\f  Go paper
\t  horizontal tab
\b  backspace
Point escape: ==> u002e
The escape of the dollar sign: $ ==> u0024
The escape of the symbol: ^ = = > u005e
Left curly brace escape: {==> u007b
Escape of opening parenthesis: [==> u005b
Escape of left parenthesis: Span lang= "en-us" > (escape of ==> u0028
Vertical bar: | ==> u007c
Escape of Right parenthesis: Asterisk: * ==> u002a
The escape of the plus sign: + ==> u002b
question mark escape: ==> u003f
Backslash escape:  ==> u005c

So \\| It can actually be written as:\\u007C

Java Escape character \\|

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.