fork download
  1. # your code goes here
  2. import re
  3.  
  4. s = 'ABCDEFGHIJKLMNOCDEFGZYPE'
  5.  
  6. print re.findall(r".+?(?<=CDE)(?=FG)|.+", s)
  7.  
Success #stdin #stdout 0.01s 9016KB
stdin
Standard input is empty
stdout
['ABCDE', 'FGHIJKLMNOCDE', 'FGZYPE']