I'm trying to parse a string such as "ABCeRIsqABCSDABCsde"
in order to extract "ABCeRIisq"
, "ABCSD"
and "ABCsde"
.
I've managed to get the first occurrences with a lookahead assertion :
re.findall("ABC.*?(?=ABC)","ABCeRIsqABCSDABCsde")
['ABCeRIisq', 'ABCSD']
How can I get all the occurrences? Is there any way do this without lookahead ?
Thanks!