我知道使用简单的负面回顾
#(?<!first word)\r\nsecond word#s
这不会second word在
some text
first word
second word
some text
并按预期匹配
some text
second word
some text
它也在这里匹配,但不应该
some text
first word
any other text
second word
some text
我需要如何修改我的正则表达式以满足要求?
我试过#(?<!first word).*second word#s了,但它总是匹配。
我需要这个来搜索记事本++中的许多文件