Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Find this but not that (search for a page that has a string, #379

Open
wisemike2 opened this issue Mar 15, 2023 · 2 comments
Open

Find this but not that (search for a page that has a string, #379

wisemike2 opened this issue Mar 15, 2023 · 2 comments

Comments

@wisemike2
Copy link

wisemike2 commented Mar 15, 2023

Is it possible to add a new box for excluded words or something? (like the Exclude dirs box): Search for the this but not that..?
I tried using regex for that but it doesn't seem to work, like:
^(?!.*not).*yes.*$ or (?=.*yes)(?!.*not)(.+)

What I need is to find files that has a certain word (ex: yes), and not the other (ex: not). So if the file has both words it doesn't show in the results (something like a 2-step inverse search), it shows only the file that has the main word, and if the other word is present, it doesn't show it in the search results.

@stefankueng
Copy link
Owner

first do an inverse search for the string you do NOT want.
Then do the search for what you want with "search in found files"
image

@gcory-vertafore
Copy link

It would be helpful if there was an option for "Inverse search in found files". That way, the inverse search would not have to be the first operation. You could search for files containing X, and then search those results for those that do not contain Y.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants