Skip to content

Instantly share code, notes, and snippets.

@guitarrapc
Created May 16, 2019 08:01
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save guitarrapc/6aeb31f97f92262cbf79b87c7641aa21 to your computer and use it in GitHub Desktop.
cmd FINDSTR can act as RegularExpression
echo hogemoge-dev | FINDSTR /R ".*staging\>" > NUL
IF %errorlevel% EQU 0 (
echo success staging
) ELSE (
echo fail staging
)
echo hogemoge-dev | FINDSTR /R ".*dev\>" > NUL
IF %errorlevel% EQU 0 (
echo success dev
) ELSE (
echo fail dev
)
echo hogemoge-staging | FINDSTR /R ".*staging\>" > NUL
IF %errorlevel% EQU 0 (
echo success staging
) ELSE (
echo fail staging
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment