fork download
  1. import re
  2. text = '1. first slice 2. second slice 3. slice number 3 4. the next one 5 that will not work but belong to no four 5. and this should be 5 and so one...'
  3. parts = re.findall(r"(\d+\..*?)(?=\d+\.|$)", text)
  4. print(parts)
Success #stdin #stdout 0.02s 9936KB
stdin
Standard input is empty
stdout
['1. first slice ', '2. second slice ', '3. slice number 3 ', '4. the next one 5 that will not work but belong to no four ', '5. and this should be 5 and so one...']