How to split a sentence to words at whitespaces? E...
# getting-started
j
How to split a sentence to words at whitespaces? Ex.:
"aa      bb        cc         dd".split(" ")
returns
[aa, , , , , , bb, , , , , , , , cc, , , , , , , , , dd]
. I tried the regex
"\\s"
but it didn't give the expected result.