JSFiddle - React, Tailwind, and code Playground JavaScript var string = "[Blah][Something.][Where.]".split("][").join("] + ["); alert(string);