How do I search files in Eclipse so the results shows files that do NOT contain the search term?

自作多情 提交于 2019-12-18 12:08:22

问题


In Eclipse editor, if I go Search->File, I can search for files that contain my search term. What I want to do is find all of the files that DO NOT contain my search term. Is that possible?


回答1:


Try checking "regular expression" option and then input somethign like [^term] or (?!term) -- meaning of both of this is 'not term' but they are slightly different (please refer to some RegExp documentation like this).




回答2:


This expression should work (reference):

(?s)\A((?!YourSearchText).)*\Z



回答3:


The simplest way imo is to use InstaSearch Eclipse plugin and type:

search text -wordToExclude -anotherWordToExclude



来源:https://stackoverflow.com/questions/1149057/how-do-i-search-files-in-eclipse-so-the-results-shows-files-that-do-not-contain

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!