fork(1) download
  1. import re
  2. txt = 'Chevy is my car and Rusty is my horse.\nMy car is very pretty my dog is red.'
  3. print(re.findall(r'(?:\S+[ \t]+){0,2}my car', txt, re.I))
Success #stdin #stdout 0s 9992KB
stdin
Standard input is empty
stdout
['Chevy is my car', 'My car']