Join Slack
Communities
Powered by
How to split a sentence to words at whitespaces? E...
# getting-started
j
jabba
10/08/2017, 4:43 PM
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.
Open in Slack
Previous
Next