一个正则匹配式的问题,把下面代码中的remove_chars正则匹配式码住就行
import re
remove_chars = '[0-9’!"#$%&\'()*+,-./:;<=>?@,。?★、…【】《》?“”‘’![\\]^_`{|}~1.\'`-]+'
special_words=["1","..","\'","`","-"]
sentences="i thought i was on the \"same\" page' as `crocs when -i ordered the pwclog . it confusing ... i thought i was ordering a sale on crocs . they are not crocs.."
a=re.sub(remove_chars," ",sentences)
print(a)
输出结果: