WIP: better templates for regexp