如果我有這樣的正則表達式替換模式匹配的多行
The cat sat on the mat
Expropriations for international monetary exchange (Currenncy: Dollars,
Value: 50,000)
The cat sat on the mat
Expropriations for international monetary exchange (Currenncy: Yen)
The cat sat on the mat
一堆文字是否有一個正則表達式,我可以在查找使用/替換我的文本編輯器的功能(JEDIT)識別所有的線是字Expropriations
和一端與右括號然後把那些行方括號讓它們看起來像這裏面的開始:
The cat sat on the mat
[Expropriations for international monetary exchange (Currenncy: Dollars,
Value: 50,000)]
The cat sat on the mat
[Expropriations for international monetary exchange (Currenncy: Yen)]
The cat sat on the mat
棘手的是,右括號可能會落在與「徵用」單詞相同的行末尾或下一行的末尾。 (在括號關閉之前甚至可能會有多行)