fork download
  1. import re
  2. s = 'I like bla blab blah chocolate I like bla blob bla cheese'
  3. print( re.findall(r'\b(I like)\b.*?(\w+)(?=\s*(?:\bI like\b|$))', s) )
Success #stdin #stdout 0.02s 9616KB
stdin
Standard input is empty
stdout
[('I like', 'chocolate'), ('I like', 'cheese')]