fork(1) download
  1. import re
  2.  
  3. text = "She's so nice!"
  4. matches = re.findall(r'[A-Za-z]+|[^A-Za-z ]', text)
  5.  
  6. print(matches)
Success #stdin #stdout 0.02s 64156KB
stdin
Standard input is empty
stdout
['She', "'", 's', 'so', 'nice', '!']