The regular expression indicates that four backslashes are required for a backslash.

Source: Internet
Author: User
The backslash '\' in Java is usually used in combination with other characters. we sometimes call it an escape character.
To indicate a backslash '\' in Java code, it must be written as "\" in the form of a double slash. The first backslash represents an escape character, and the second can be seen as a common character.
Java does not allow the occurrence of odd backslashes. Unless there are other characters, the last backslashes are treated as escape characters.

To represent a backslash in a regular expression, four backlash lines must be used to represent "\\\\"

The four backslashes can be understood as the first two "generations" and the last two "generations.

The regular expression indicates that four backslashes are required for a backslash.

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.