I have a string like "Azarenke V. Su Simple 90"
and I need to split it and put all words in array.
I using this code:
var s = "Azarenke V. Su Simple 90";
var array = s.split(/(\ +)/);
console.log(JSON.stringify(array));
but the result is:
"["Azarenke"," ","V."," ","Su"," ","Simple"," ","90"]"
Where is some 'empty' strings contains only spaces. But I do not whant to push them in output array. I familiar in C# and .net, it has something like RemoveEmptyEntries
but can't find the same in javascript. How to solve this task? Possible I need to make some remarks in regular expression?