0 points

Remove punctuation from text


dashboard

Sat Oct 17 2020 16:34:53 GMT+0000 (UTC)

Posted by @ianh #python #regex #punctuation

import re 
s = "string. With. Punctuation?" 
s = re.sub(r'[^\w\s]','',s) 
content_copy Copy

https://www.quora.com/How-do-I-remove-punctuation-from-a-Python-string