re.findall returns a list of all occurrences of the given pattern : findall « Regular Expressions « Python Tutorial






import re

pat = '[a-zA-Z]+'
text = '"Hm Err -- are you sure?" he said, sounding insecure.'
print re.findall(pat, text)








16.2.findall
16.2.1.re.findall returns a list of all occurrences of the given pattern
16.2.2.find the punctuation
16.2.3.Find a string