Do /gm matches in templates