If you take a look at the documentation, findstr
doesn't support most traditional regex features, such as \s
, which you are using. It doesn't even support the +
quantifier!
The following table lists the metacharacters that findstr accepts.
| Meta Character | Value
| . | Wildcard: any character
| * | Repeat: zero or more occurrences of the previous character or class
| ^ | Line position: beginning of the line
| $ | Line position: end of the line
| [class] | Character class: any one character in a set
| [^class] | Inverse class: any one character not in a set
| [x-y] | Range: any characters within the specified range
| \x | Escape: literal use of a metacharacter x
| \<string | Word position: beginning of the word
| string\> | Word position: end of the word
You can easily get away with this, and it'll still accept it if even there are multiple spaces or tabs:
findstr /c:"Finished Processing job number" filename
Furthermore, it seems that it's not even case sensitive by default