Use replace. Equal speed and less errors on mismatched braces