Reputation: 409
Sometimes I would find very useful to search (ctrl - shift - f) in intellij idea all files containing "string1" AND "string2".
Is this somehow possible?
Upvotes: 0
Views: 843
Reputation: 47865
You could use a regex search. Here's an example:
This regex: (?s)^(?=.*?string1)(?=.*?string2)
matches any file that contains both strings, it doesn't care about order (i.e. which string comes first in a given file) nor does it care about the number of strings you search for so you can add additional criteria by appending another (?=.*?_your_text_here)
.
In addition, it can be easily extended to cover logical ORs ...
(?s)^(?=.*?string1)|(?=.*?string2)
Upvotes: 2
Reputation: 12491
Search for string1
, then for string2
while using scope Files in Previous Search Result
Upvotes: 5