I have some strings which are in a format
lorem ipsum, dolor sit - amet, consectetur : adipiscing elit. Praesent vitae orc
I want it to get split at the first instance of each separator, to return
['lorem ipsum',
'dolor sit',
'amet, consectetur',
'adipiscing elit. Praesent vitae orc']
Right now my output is
['lorem ipsum',
'dolor sit',
'amet',
'consectetur ',
'adipiscing elit. Praesent vitae orc']
Right now I'm using re.split(', | - |: ', txt) but it separates at all the instances in the string. Any suggestions on how I can achieve the required output?
Edit:
I realised my question isn't clear, so for an example, if the string is
"abc: def: ijk, lmno: pqr - stu, wx"
the output should be
["abc",
"def: ijk",
"lmno: pqr",
"stu, wxy"]
and not
["abc",
"def",
"ijk",
"lmno",
"pqr",
"stu",
"wxy"]