imho it'd be a quick and worthwhile update to make the following changes:
Limit the characters allowed to be used as separators -- maybe something like throw an error if you match /[`!$^&*()|+-=?:'",.<>{}[]\/]/gi
And update the str.replace line to do global replaces.
array[i] = array[i].replace(new RegExp(this.separator, 'g'), ' ');