Elias Tarhini added the comment:
Thank you. Was too zeroed-in on the idea that it was from the zero-width
pattern, and I forgot to consider the group. Looks like `re.sub(pattern,
'some-delim', s).split('some-delim')` is a way to do this if it's not possible
to
New submission from Elias Tarhini :
I believe I've found a bug in the `re` module -- specifically, in the 3.7+
support for splitting on zero-width patterns. Compare Java's behavior...
jshell> "1211".split("(?<=(\\d))(?!\\1)(?=\\d)");
$1 ==>