How to print the pattern matched from a list to FINDSTR output?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • carshid
    New Member
    • Oct 2011
    • 2

    #1

    How to print the pattern matched from a list to FINDSTR output?

    I am using FINDSTR to find a list of strings (strored in a file) in source files. I am getting the list of files that match any of the strings in the list. However, I also need which string (pattern) was actually matched to be printed out.

    I am using the following the command currently:

    >findstr /S /M /G:search_string _list.txt *.cpp

    Is there an option/trick to also print the string that was matched to the output?
Working...