I think what I want to do is a fairly common task but I\'ve found no reference on the web. I have text with punctuation, and I want a list of the words.
\"H
try this:
import re phrase = "Hey, you - what are you doing here!?" matches = re.findall('\w+', phrase) print matches
this will print ['Hey', 'you', 'what', 'are', 'you', 'doing', 'here']
['Hey', 'you', 'what', 'are', 'you', 'doing', 'here']