fork download
  1. import re
  2. p = re.compile(r'([A-Za-z]+?)(?:Suff)?\b')
  3. test_str = "textSuff more words tSuff"
  4. print(re.findall(p, test_str))
Success #stdin #stdout 0.01s 7692KB
stdin
Standard input is empty
stdout
['text', 'more', 'words', 't']