Let's say I have a string like the following:
var str = "hello=world&universe";
And my regex replace statement goes like this:
str.replace(/([&=])/g, ' ');
How do I get the delimiters that split my string from the above regex replace statement?
I would like the result to be something like this:
var strings = ['hello', 'world', 'universe'];
var delimiters = ['=', '&'];