import rerx = r"\b(?!rty\b)[a-z]+"s = "qwe rty uio"print(re.findall(rx, s))
Standard input is empty
['qwe', 'uio']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!