Guido van Rossum added the comment: It's not a space, it's a null byte.
Would you mind pointing out exactly where the Python docs state that \0 in re.sub() refers to th ewhole group? (IIRC it should only say that group 0 refers the whole string in the argument to the .group() method on a match object as returned by re.match() or re.search().) ---------- nosy: +gvanrossum _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17426> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com