Find Files That Contain Both Words in Notepad++
Edit: sorry, I missed the without resorting to Regular Expressions. Sadly, you'll need to use a RegEx to do this as far as I know. I've setup the RegEx below for you.
Under find in files use Alpha.*Bravo
in the Find what select Regular expression and .matches newline.
Select the Directory to search in and you should find your files.
If you need them in other order as well, you can do the same inverting the words: Bravo.*Alpha
If there is different case possibilities you'll need to show that IE [aA]lpha.*[bB]ravo
Related videos on Youtube
Comments
-
SethO almost 2 years
In Notepad++ (v5.9), I want to search for files which contain two words. For example, I would like to find all text files in a directory that have both
Alpha
andBravo
in the file. They may not be next to each other and they may have multiple occurrences of either. I just want to find the files that have at least one instance of each.Is there a way to structure this search without resorting to Regular Expressions?
Thanks for the advice.
-
snowdude over 11 yearsAny reason you're sticking to Notepad++ for file searching? A simple search tool like Agent Ransack might be a better than sticking with the built-in search?
-
SethO over 11 yearsA junior engineer asked me about it. She has Notepad++ installed and uses it regularly. There is no reason to only search with that tool, but that's how the question came to me. I'll give Agent Ransack a look over.
-
-
SethO over 11 yearsThanks, Jeff. I don't mind using RegEx. I was trying to help out someone who doesn't have much experience with it. Time to teach!