Simple regexp-substitution filter, using re.sub

Gives a bit more in-template logic leeway, useful e.g. in salt templates
where "just put it in the view function" is not convenient.