简体   繁体   中英

Escape Sequence vs. Whitespace Character (\s)

Are escape sequences and whitespace characters the same thing? I'm not sure what else to write here but Stackoverflow said the first sentence is not enough so I'm typing this second sentence for no reason at all but that so this post will go through.

There are a few escape sequences specified in Java , of which \\s is not part. The \\s is recognized as whitespace in regular expressions, where it is a predefined character class.

Check the following sections from the Java Tutorial:

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM