我有來自外部的我的應用程序字符串和可能看起來像這些引號:如何正確處理正則表達式匹配
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