Allow deves to provide variable matching regexp

This would allow devs to make the patterns in their strings match the
patterns in their templating or formatting engines. I.e.: a developer
could change the pattern to `/\{([a-zA-Z\.]+)\}/` to require variables
to be in the format `{variable}`.