fork download
  1. import re
  2. p = re.compile(r'(?=((?:hello|you).*?(?:hello|you)))', re.IGNORECASE | re.DOTALL)
  3. test_str = "Hello how are you doing you have a nice day hello there"
  4. print(p.findall(test_str))
Success #stdin #stdout 0.01s 8968KB
stdin
Standard input is empty
stdout
['Hello how are you', 'you doing you', 'you have a nice day hello']