@echo off set myvar= 192.168.1.1 echo %myvar% | findstr /i /r [A-za-z] if %errorlevel% == 1 echo true pause