I have this string:
var myTXT = "Aa bbb cccc" ;
How can I split it by white space (' ') and & nbsp; using a regex
The expected output is
Aa at index 0 bbb at index 1 cccc at index 2
Use an or
console.log("Aa bbb cccc".split(/\s| /g))