Serhiy Storchaka added the comment: Here is a patch which make unmatched groups to be replaced by empty string. These changes looks rather as new feature than bug fix and therefore can be applied only to 3.5.
---------- components: +Library (Lib) keywords: +patch nosy: +serhiy.storchaka stage: -> patch review type: -> enhancement versions: +Python 3.5 -Python 2.6, Python 2.7 Added file: http://bugs.python.org/file36650/re_sub_unmatched_group.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue1519638> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com