2012-03-05 8 views
-4

私はこのようなテキストの体を持っている:引用符内のテキストをすべて削除します正規表現のPythonのレッグ式引用符内のテキストをすべて削除する

According to James, "we do not know" the source of the problem, "we are clueless". 

どのような?私は括弧付きでre.subを使用しましたが、私は "s"を識別するための式を思いつきません。

答えて

0
text = 'According to James, "we do not know" the source of the problem, "we are clueless".' 
re.sub('".+?"', '', text) 
関連する問題