If I have the following string
"[Blah][Something.][Where.]"
What is the best way to locate wherever the "][" is and add a " + " in between them?
In other words, the resulting string should be:
"[Blah] + [Something.] + [Where.]"
If I have the following string
"[Blah][Something.][Where.]"
What is the best way to locate wherever the "][" is and add a " + " in between them?
In other words, the resulting string should be:
"[Blah] + [Something.] + [Where.]"
Using regular expressions...
var str = "[Blah][Something.][Where.]"
var newString = str.replace(/\]\[/g, ']+[');