我有来自外部的我的应用程序字符串和可能看起来像这些引号:如何正确处理正则表达式匹配
Prefix content. "Some content goes here". More contents without quotes.
Prefix content. "Another "Additional" goes here". More contents without quotes.
Prefix content. "Just another "content". More contents without quotes.
的关键值得注意的是,弦都加上引号,我需要处理这些正确引用。其实我需要捕捉引号内的所有内容。我尝试了.*(".*").*
和.*(".+").*
等模式,但它们似乎只捕捉两个最接近的引号之间的内容。
目前还不清楚你想要捕获哪些内容。例如,在#3行中,你想匹配什么? – FailedDev