Oct-22-2019, 02:18 PM
The replace method is what you want. I expect the problem you are having is that not all of the examples you showed used ascii quotes, some of them are using smart quotes. So you would need to replace three times, replacing the ascii quote, the starting smart quote, and then ending smart quote.
I found these in some old code I used scraping facebook data. I think they are the single and double smart quotes:
I found these in some old code I used scraping facebook data. I think they are the single and double smart quotes:
REPLACEMENTS = (('\x32\x80\x94', '--'), ('\xe2\x80\x99', "'"), ('\xe2\x80\x98', "'"), ('\xe2\x80\x9c', '\\"'), ('\xe2\x80\x9d', '\\"'))
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures