标签: python regex comments
我想在python中从文本中删除所有带引号的单词/词组(保留句子中的引号)。示例:
The text has "single quotes" and "commas". The text has "double quotes".
从引号中删除单词会导致:
The text has "" and "". The text has "".
我正在寻找一种使用正则表达式的方法,但没有找到。有人有什么想法吗?