With the re module, it seems that I am unable to split on pattern matches that are empty strings:
re
>>> re.split(r\'(?
import regex x="bazbarbarfoobar" print regex.split(r"(?
You can use regex module here for this.
or
(.+?(?
Use re.findall .
re.findall
See demo