<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 21 Oct 2018, at 22:32, Jacob Carlborg wrote:</p>
</div>
<div style="white-space:normal"><blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><p dir="auto">No, I’m talking about having variables in the grammar with reusable regular expression snippets. Something like:<br>
[…]</p>
</blockquote></div>
<div style="white-space:normal">
<p dir="auto">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 <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">${…}</code> it should not really cause an issue with escaping, as the only thing that should meaningfully go after <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">$</code> in a regexp is <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">\n</code> (or possibly '(').</p>
</div>
</div>
</body>
</html>