Re-insert missing brackets from regex match mode