How do I split a string with any whitespace chars as delimiters?

What regex pattern would need to pass to the java.lang.String.split() method to split a string with all whitespace characters (’ ', ’ ', ’
', etc.) as delimiters?

Something in the lines of

myString.split("\\s+");

this groups all whitespaces as a delimiter... so if i have the string "Hello[space][tab]World", this should yield the strings "Hello" and "World" and omit the empty space between the space and the tab.

 

As VonC pointed out, the backslash should be escaped, because Java would first try to escape the string to a special character, and send that to be parsed. What you want, is the literal "\s", which means, you need to pass "\\s". It can get a bit confusing.

 

The \\s is equivalent to [ \	\

\x0B\f\r]