Nope, this will check for backticks inside curly braces, not outside. Basically we need to ensure that the number of backticks before replaced substring is even. I'm pretty sure that can be done with a single regexp, but I don't think it's worth it.