title: Batch file, check if string contains another string with special characters
body: <p>I am trying to write a batch file that will append some items to the proxy exceptions list.</p>
  
  <p>I've currently got this:-</p>
  
  <pre><code>echo off
  setlocal
  
  for /f "tokens=2*" %%a in ('reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride') do set "var=%%b"
  
  set "devlocal=;*.dev.local;"
  set "local=*.local;"
  
  set "exceptions=%var%%devlocal%%local%"
  
  echo "%exceptions%"
  
  pause
  
  reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /t REG_SZ /d "%exceptions%" /f
  
  pause
  </code></pre>
  
  <p>This runs okay. But what I want to do is firstly check to see if <code>*.dev.local</code> already exists in the exceptions and if so do NOT add it in. The same for <code>*.local</code>.</p>
  
  <p>I cant seem to use <code>FINDSTR</code> as it doesent support special characters such as <code>*</code>.</p>