As the title said, I want to match ip address with batch in windows, please tell me how I can do it?
I see that \"finds
In case the input of your findstr command should not be the result of ipconfig, you could use the following line of code to look for an ip-address in a text or csv file.
findstr /r "\<[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\>" filename.txt
It adds to metacharacters to the answer of user Joey. "\<" at the beginning and ">" at the end. Even though such a string might not be very common (or very unlikely to occur) this makes sure that no string in an ip-address-like format but with an alphabetic character at the end and/or the beginning (e.g. A198.252.206.16 or 198.252.206.16A) is returned.