BATCH / CMD - findstr with regex

49 views Asked by At

I have following line as a result of a scheduled task:

Last Result:                                            -1073741510

Now, I try to grab only for 0 (without any negative sign). I ended up with this:

echo "Last Result:                                            -1073741510" | findstr /r "Last Result: * 0$"

And I tried a lot of variations of the example above (i.e. without $, or with </searchstr/>, and so on, but that doesn´t work properly :-/

What am I making wrong?

Just for your interest, the line with the Last Result:... is the output of a loop, and I only want to exit the loop if a last result of 0 is found.

But findstr is a little difficult to get to work for me...

0

There are 0 answers