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

15,219

Solution 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).

Solution 2

This expression should work (reference):

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

Solution 3

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

search text -wordToExclude -anotherWordToExclude

Share:
15,219
Cambo
Author by

Cambo

Updated on June 27, 2022

Comments

  • Cambo
    Cambo almost 2 years

    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?