In the Oracle Pattern documentation there is the description of three different pattern for matching whitespace :
- \s
- \p{Space}
- \p{javaWhitespace}
I’m wondering what are the specificity of each and how to know how to choose the right one.
I’ve just noticed that \p{javaWhitespace} include more space type.
I would rather use the first.
\p{javaWhitespace}includeFILE SEPARATOR,GROUP SEPARATOR,etc… see this. Using it when these are not needed may confuse somebody else.\sis while I’ll expect them to double check what is the exact definition of\p{javaWhitespace}. You don’t want that, as it diminish code clarity and add unnecessary burden during debugging.