reg = '''[( )|(" ")|(r',')|(\\-)|(\\、)|(\\。)|(\\:)|(\\?)|(\\())|( )|(<img.*?>)|(<br>)|(</br>)|(<br/>)|(<span.*?>)|(</span>)|(<p.*?>)|(</p >)|(<u.*?>)|(</u>)|(<sup.*?>)|(</sup>)|(<sub.*?>)|(</sub>)|(<font.*?>)|(</font>)|(<strong.*?>)|(</strong>)|(</underpoint>)|(<b>)|(</b>)|(\s+)|(,)|(:)|(\\·)|(\\“)|(\\;)|(\\《)|(\\》)|(\\__)|(\\”)]''' res['choice']=res['choice'].apply(lambda x:re.sub(reg,'',x))
python 去除字符串的空格和标点符号等
最新推荐文章于 2024-06-13 09:50:09 发布