I'm new to Jinja2 and so far I've been able to do most of what I want. However, I need to use regular expressions and I can't seem to find anything anywhere in the documentation or on teh Googles.
I'd like to create a macro that mimics the behavior of this in Javascript:
function myFunc(str) {
return str.replace(/someregexhere/, '').replace(' ', '_');
}
which will remove characters in a string and then replace spaces with underscores. How can I do this with Jinja2?