问题
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