import res = "du bist toll MMM1MMM"l = re.compile("'MMM(.*)MMM'").split(s)print l
Standard input is empty
['du bist toll MMM1MMM']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!