答案1
我想在不同的文件中搜索 3 个不同的关键词
菜单“搜索”>“在文件中查找”(或Ctrl+ Shift+ F)
将“查找内容”设置为
//approved|// approved|/\*\r\napproved\r\n\*/
。启用“正则表达式”和“匹配换行符”
点击“查找全部”
笔记:
测试.txt:
foo
//approved
bar
// approved
foo
/*
approved
*/
bar
查找结果:
Search "//approved|// approved|/\*\r\napproved\r\n\*/" (5 hits in 2 files)
F:\test\notepad regex answer template nl.txt (2 hits)
Line 5: - Set "Find what" to `//approved|// approved|/\*\r\napproved\r\n\*/`.
Line 5: - Set "Find what" to `//approved|// approved|/\*\r\napproved\r\n\*/`.
F:\test\test.txt (3 hits)
Line 2: //approved
Line 4: // approved
Line 6: /*