grep regex ip code example
Example: ip address regex validate cmd
echo off
:start
cls
set /p localWireless=input wireless ip address ? &
echo %localWireless% | findstr /i /r [0-9].*.[.].*.[0-9].*.[.].*.[0-9]
if %errorlevel% equ 0 (
goto installLocalWireless
) else (
msg %username% 'ip address is not valid'
goto start
)
:installLocalWireless
cls
echo Hello Wordl
pause
goto start