find the punctuation : Findall : Regular Expressions PYTHON TUTORIALS


PYTHON TUTORIALS » Regular Expressions » Findall »

 

find the punctuation


import re

text = '"Hm Err -- are you sure?" he said, sounding insecure.'

pat = r'[.?-",]+'
print re.findall(pat, text)



Leave a Comment / Note


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


PYTHON TUTORIALS

 Navioo Regular Expressions
» Findall