re.findall returns a list of all occurrences of the given pattern : Findall : Regular Expressions PYTHON TUTORIALS


PYTHON TUTORIALS » Regular Expressions » Findall »

 

re.findall returns a list of all occurrences of the given pattern


import re

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



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Regular Expressions
» Findall