Hi
One of my plays tries to do a regex_replace on the returned content of
the uri module, which is HTML with new lines in it.
This seems to fail as from the debug output I can see that
regex_replace doesn't do multiline matching.
I see that there is basically only one flag for re.sub in regex_replace:
https://github.com/ansible/ansible/blob/devel/lib/ansible/plugins/filter/core.py#L137-L140
For my regex to work, I would need both the re.MULTILINE and re.DOTALL
flags to be set for re.sub.
Instead of hard coding one or two flags as arguments, wouldn't it make
sense to have the filter accept an argument of the raw flags?
This would make things much more flexible (and powerful!).