fork(1) download
  1. import re
  2. my_string = "Hey, I'm 9/11 7-11"
  3. print(re.findall(r'\w+|[^\w\s]', my_string))
  4.  
Success #stdin #stdout 0s 23352KB
stdin
Standard input is empty
stdout
['Hey', ',', 'I', "'", 'm', '9', '/', '11', '7', '-', '11']