[issue10328] re.sub[n] doesn't seem to handle /Z replacements correctly in all cases
report at bugs.python.org
Fri Nov 5 22:10:00 CET 2010
Matthew Barnett <python at mrabarnett.plus.com> added the comment:
It's a bug caused by trying to avoid getting stuck when a zero-width match is found. Basically the fix is to advance one character after a zero-width match, but that doesn't always give the correct result.
There are a number of related issues like issue #1647489 ("zero-length match confuses re.finditer()").
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list