[issue36397] re.split() incorrectly splitting on zero-width pattern

2019-03-23 Thread Elias Tarhini
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

[issue36397] re.split() incorrectly splitting on zero-width pattern

2019-03-21 Thread Elias Tarhini
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 ==>