Regular expression in Python
import re
#Match any word
wre = re.compile('\w')
wre.sub(' ','This. Is, A, Text{}') #Replace any word with an empty strijng
#Match everything that is not a word
notwre = re.compile('[^\w]')
notwre.sub('','This. Is, A, Text{}')