grep windows code example
Example 1: grep in windows
Use findstr in Windows with following command line structure:
findstr [/I] [/S] "substring" "regex_file_name"
/I Case-insensitive search.
/S Search files in subfolders recursively.
Example 2: grep windows
findstr /spin /c:"string" [files]
The parameters have the following meanings:
s = recursive
p = skip non-printable characters
i = case insensitive
n = print line numbers
And the string to search for is the bit you put in quotes after /c: