bpo-25054, bpo-1647489: Added support of splitting on zerowidth patterns (alternate version). by serhiy-storchaka · Pull Request #4678 · python/cpython (original) (raw)

Also fixed searching patterns that could match an empty string.

This will fix bpo-852532, bpo-1647489, bpo-3262, bpo-25054, and maybe others.

The difference with #4471 is that in findall() and finditer() empty matches are included in the result only when not adjacent to a previous match for consistency with split() and sub().

https://bugs.python.org/issue25054