fork(1) download
  1. import re
  2. r = re.compile(r'\b(?=\w*(?<![iosxz])(?<![cs]h)es\b)\w*')
  3. s = 'it matches "likes", "hates" etc. However, it does not match "bathes", why doesn\'t it?'
  4. print(re.findall(r, s))
Success #stdin #stdout 0s 9024KB
stdin
Standard input is empty
stdout
['likes', 'hates', 'bathes']