Matthew Barnett <pyt...@mrabarnett.plus.com> added the comment:
The arguments are: re.sub(pattern, repl, string, count=0, flags=0). Therefore: re.sub("pattern","replace", txt, re.IGNORECASE | re.DOTALL) is passing re.IGNORECASE | re.DOTALL as the count, not the flags. It's in the documentation and the interactive help. ---------- resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41764> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com