Asked by: Corine Ruzimatovasked in category: General Last Updated: 13th February, 2020
What does \ s+ mean in Java?
Similarly one may ask, what does \ s+ do in Java?
\s - matches single whitespace character. \s+ - matches sequence of one or more whitespace characters.
Additionally, what does s mean in regex? s stands for “whitespace character”. Again, which characters this actually includes, depends on the regex flavor. In all flavors discussed in this tutorial, it includes [ f]. That is: s matches a space, a tab, a carriage return, a line feed, or a form feed.
Thereof, what is the meaning of \ s in Java?
The string s is a regular expression that means "whitespace", and you have to write it with two backslash characters ( "\s" ) when writing it as a string in Java.
What does S Split do?
Using split() When the string is empty, split() returns an array containing one empty string, rather than an empty array. If the string and separator are both empty strings, an empty array is returned.