所有的多行記事本+ 2特定的詞與詞之間,提取字符串/數據在數據
我一直在試圖提取使用正則表達式搜索和替換在記事本2名特定的詞++之間的文本,但沒有運氣,
它讓我發現,我試圖尋找堆棧溢出,隨後通過幾個問題,但沒有運氣的最後一場比賽,我的數據是
Open options for my word1
My Text1
My Text1 Second Line
My Text1 Third Line
Word2 My Fixed Text Word3
Open options for my word1
My Text2
My Text2 Second Line
My Text2 Third Line
Word2 My Fixed Text Word3
Open options for my word1
My Text3
My Text3 Second Line
My Text3 Third Line
Word2 My Fixed Text Word3
Open options for my word1
My Text4
My Text4 Second Line
My Text4 Third Line
Word2 My Fixed Text Word3
Open options for my word1
My Text5
My Text5 Second Line
My Text5 Third Line
Word2 My Fixed Text Word3
Open options for my word1
My Text6
My Text6 Second Line
My Text6 Third Line
Word2 My Fixed Text Word3
Open options for my word1
My Text7
My Text7 Second Line
My Text7 Third Line
Word2 My Fixed Text Word3
,我的正則表達式是.*word1(.*?)Word2.*
,我以$ 1替換它
它給了我正則表達式匹配的最後一次出現的文本,Can Someone可以查看它並告訴我在這裏丟失了什麼。
我無法在我的系統上覆制此問題。你打勾了嗎?匹配換行符選項? –
那麼,如果你不打開*'.'匹配換行*,它不會取代任何東西。 –