I'm trying to come up with the regular expression to split a string up into a list based on white space or trailing punctuation.
e.g.
s = 'hel-lo this has whi(.)te, space. very \n good'
What I want is
['hel-lo', 'this', 'has', 'whi(.)te', ',', 'space', '.', 'very', 'good']
s.split()
gets me most of the way there, except it doesn't take care of the trailing whitespace.