fork download
  1. import re
  2.  
  3. str = "this is a really weird test"
  4.  
  5. words = re.findall(r"\b[^aeiouy\W]*[aeiouy][^aeiouy\W]*\b", str)
  6.  
  7. print(words)
Success #stdin #stdout 0.06s 9568KB
stdin
Standard input is empty
stdout
['this', 'is', 'a', 'test']