Q: Best way to insert char in specific points of string in javascript? 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.]"


A: Using regular expressions... 
var str = "[Blah][Something.][Where.]"
var newString = str.replace(/\]\[/g, ']+[');

Relevant jsFiddle

A: I'd use split and join. 
var string = "[Blah][Something.][Where.]".split("][").join("] + [");

http://jsfiddle.net/tDFh3/4/
If it was not a constant string, I would fallback to a regular expression and replace. 

A: Use regular expresions to find ][ and then add +

A: What about a regex:


*

*search for \]\[

*replace by ] + [
Demo
