我需要在记事本++中替换多行子字符串
文字:
some text-123 first time occurrence1
blah-blah-blah some other text
-blah end of selection1 abc
-blah-blah 123 second time occurrence2
blah-blah-blah
-blah-blah end of selection2 def
some other text
因此,我需要选择:
123 first time occurrence1
blah-blah-blah some other text
-blah end of selection1 abc
但正则表达式
(?im)123 [\S\s]*end of.*$
选择
123 first time occurrence1
blah-blah-blah some other text
-blah end of selection1 abc
-blah-blah 123 second time occurrence2
blah-blah-blah
-blah-blah end of selection2 def
我如何只选择第一次出现,“第二次出现2”除外?