Find Files That Contain Both Words in Notepad++

14,971

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

Share:
14,971

Related videos on Youtube

SethO
Author by

SethO

Never stop learning.

Updated on September 18, 2022

Comments

  • SethO
    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 and Bravo 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
      snowdude over 11 years
      Any 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
      SethO over 11 years
      A 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
    SethO over 11 years
    Thanks, 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!