Search a file for multiple alternative terms?

Search a file for multiple alternative terms?

1
NewbieNewbie
1

    Sep 30, 2014#1

    I have a list of 25 terms that I need to search for in a file that I receive on a daily basis. Is there a way to automate this process?

    Thanks,

    Rob

    11327
    MasterMaster
    11327

      Sep 30, 2014#2

      It's impossible to lead us astray for we don't care even to choose the way.

      6,603548
      Grand MasterGrand Master
      6,603548

        Oct 01, 2014#3

        Ovg, posted just links to some topics. There are even more similar topics.

        For example you can use also script FindStringsWithLineNumbers.js with search string term 1|term 2|term 3|...|term 25 which is a Perl regular expression OR expression. Of course a Find in Files with this Perl regexp OR expression or a Find with option List lines containing string can be used, too.

        With a simple non regular expression replace searching for ^p and using just | as replace string the list of terms in a file can be converted into a Perl regexp OR expression as long as the terms do not contain regular expression characters. And if file ends with a DOS line termination, the last | must be removed after the replace converting the list to a Perl regexp OR expression.
        Best regards from an UC/UE/UES for Windows user from Austria