I have an array which contains the contents as follows:
[\"ZS125-48ATab\", \"STR125YBTab\", \"KS125-24Tab\", \"ZS125-50Tab\", \"DFE125-8ATab\", \"ZS125-30Tab
You can do it like this :
array = ('#' + array.join('#')).match(/#[^#]*/g) || []; // null || []
The following trick works as well, but I wonder why split ignores the first sharp...
array = ('#' + array.join('#')).split(/(?=#)/);
Indeed, I rather expected this scenario : "#a#b#c" -> ["", "#a", "#b", "#c"].
Anyway, I prefer the second method since match returns null in case of failure.