I am trying to clean a string from all special characters and retain everything else, including punctuation marks.
mystring = "Q18. On a scale from 0 to 10 where 0 means ‘not at all interested' and 10 means ‘very interested', how interested are you in helping to address problems that affect poor people in poor countries?"
My effort so far:
newlabel = re.sub('[^A-Za-z0-9]+', ' ', newstring)
Output:
Q18 On a scale from 0 to 10 where 0 means not at all interested and 10 means very interested how interested are you in helping to address problems that affect poor people in poor countries
How can I retain the punctuation marks in the regex I currently have or is there a better solution?