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?
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?