Regex matching in jinja2 filters (for use in saltstack)
<p>It seems Jinja2 (as supported in Saltstack) doesn't support regex matching, unless I'm missing something?  A number of frameworks that leverage Jinja2, such as <a href="http://docs.ansible.com/ansible/playbooks_filters.html" rel="noreferrer">Ansible have custom support</a> for regex filters.  <a href="https://stackoverflow.com/questions/12791216/how-do-i-use-regular-expressions-in-jinja2">Elsewhere</a> people are directed to write custom filters.</p>

<p>Some questions for those in the know, would probably help understand this state of affairs:</p>

<ol>
<li>What would be the best way to leverage regex matching in Saltstack?  (my use-case here is reasonably simple: testing if a string ends with a substring but the question is more general).</li>
<li>In the absence of a standard solution in Jinja2, would it be a good idea for this to be offered as a standard extension in Saltstack (akin to the Ansible solution)?</li>
<li>What's the rationale for not having standard regex support in Jinja2?  In a world where <a href="https://technet.microsoft.com/en-us/magazine/6bfc6f90-5dfa-4b4c-b6e8-f401906e0a5c" rel="noreferrer">even Windows Powershell</a> supports regex matching, there must be a reason I'm missing since <a href="https://groups.google.com/forum/#!topic/pocoo-libs/3yZl8vHJ9fI" rel="noreferrer">this perceived regression from Jinja2 compared to the previous version has been complained about since 2010</a>; however there isn't even an issue for this in <a href="https://github.com/pallets/jinja/issues" rel="noreferrer">Jinja's github</a> that I could find?</li>
</ol>