Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
The former implementation was wrong. See issue25054 which contains more obvious examples of that bug: >>> re.sub(r"\b|:+", "-", "a::bc") '-a-:-bc-' Not all colons were replaced despite the fact that the pattern matches all colons. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32308> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com