I can do basic regex alright, but this is slightly different, namely I don\'t know what the pattern is going to be.
For example, I have a list of similar strings:
How about subbing out the known text, and then splitting?
import re [re.sub('(sometxt|moretxt)', ',', x).split(',') for x in lst] # results in [['a', '0', ''], ['b', '1', ''], ['aa', '10', ''], ['zz', '999', '']]