How to represent spaces, newlines, etc. in java

Representation of special characters::

1. \t space ('\u0009')

2. \n Newline ('\u000A')

3. \\ backslash

4. \r Enter ('\u000D')

5. The \d number is equivalent to [0-9]

6. \D non-digit is equivalent to [^0-9]

7. \s blank symbol [\t\n\x0B\f\r]

8. \S non-blank symbol [^\t\n\x0B\f\r]

9. \w single character [a-zA-Z_0-9]

10. \W Not a single character [^a-zA-Z_0-9]

11. \f Form feed character

12、\e Escape

Guess you like

Origin blog.csdn.net/xiansibao/article/details/127789274