import retext = "And he's done it o`key!"print(re.findall(r"[A-Za-z]+(?:['`][A-Za-z]+)*", text))
Standard input is empty
['And', "he's", 'done', 'it', 'o`key']
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!