I want to see if a string contains another string where both strings are variables. Basically it is that same as this thread but with two variables. Taking that solution and applying it to my situation with !VAR1!
and !VAR2!
(these variables are declared within the FOR
loop) I tried:
if not x!VAR1:!VAR2!=!==x!VAR1! ECHO It contains !VAR2!
Unfortunately it doesn't work. Any help would be greatly appreciated. I have also declared SETLOCAL EnableDelayedExpansion
so I can access the variables.
Any help would be greatly appreciated!
Thanks!