Updated regex pattern to make '{% vm %}' replace a two-step process: - Search for <w:tc>...{% vm %}...</w:tc>; - Parse table cell and put jinja tags inside correct places.