fork(7) download
  1. import re
  2. p = re.compile(r"\w+(?:'\w+)*|[^\w\s]")
  3. s = "There is light!? I'm a human"
  4. print(p.findall(s))
Success #stdin #stdout 0.01s 9024KB
stdin
Standard input is empty
stdout
['There', 'is', 'light', '!', '?', "I'm", 'a', 'human']