I want to split a string by every character including spaces except characters with parenthesis in them (both open and closed). An example:
var x = "dmk (Xme) ww* 0 (u9*)";
var arr = [];
//code to split variable x
console.log(arr); /* returns ["d", "m", "k", "", "", "(Xme)", "", "w", "w", "*", "", "0", "", "(u9*)"]
I'm assuming you would have to use regex and the split function but I'm terrible with regex no matter how much I try.