On 21 Oct 2018, at 22:32, Jacob Carlborg wrote:

No, I’m talking about having variables in the grammar with reusable regular expression snippets. Something like:
[…]

I see, well for that, I think it would be more consistent (with the existing feature set) to treat regular expressions as format strings, as we already use format strings in other places related to grammars, and as variables can be referenced is ${…} it should not really cause an issue with escaping, as the only thing that should meaningfully go after $ in a regexp is \n (or possibly '(').