I have a string that contains multiple occurrences of ],[ that I want to replace with ]@[
No matter what I try I cant get it right.
var find = '],[';
var regex = new RegExp(find, "g");
mytext.replace(regex, ']@[')
Doesn't work
mytext = mytext.replace(/],[/g,']@[');
Doesn't work
Any idea where I am going wrong?