I would like to replace all punctuation from a text, except whitespaces and without splitting the text. I have tried:
text=re.sub('\W+', '', text)
but it removes whitespace. Any hint?
I would like to replace all punctuation from a text, except whitespaces and without splitting the text. I have tried:
text=re.sub('\W+', '', text)
but it removes whitespace. Any hint?