There&#x27;s a comment by &#x27;dave&#x27; - presumably, an atom dev - explaining why that&#x27;s not as quick a fix as you&#x27;d hope. But, yes, as soon as I got to the part in the article that read something like &#x27;... using backtracking to handle an unknown level of nesting ...&#x27; I reached pretty much the same conclusion: stop using regexps for this!<p>Edit: I think it might actually be the same &#x27;dave&#x27; who authored the article, which demonstrates how much he&#x27;s learnt just by fixing this one bug.