title: How to search and replace a string that have an equal-to sign "=" inside
body: <p>i have to search a string from a txt like Pippo.K=5 and replace it with Pippo.K=1. I need to search the entire string. What i did is:</p>
  
  <pre><code>set "search=Pippo.K=5"
  set "replace=Pippo.K=1"
  set "textFile=%SettingFile%.txt"
  for /f "delims=" %%i in ('type "%textFile%" ^&amp; break ^&gt; "%textFile%" ') do (
      set "line=%%i"
      setlocal enabledelayedexpansion
      set "line=!line:%search%=%replace%!"
      &gt;&gt;"%textFile%" echo(!line!
      endlocal
  )
  </code></pre>
  
  <p>but what i returned is 
  <code>5=Pippo.K=1=5</code></p>
  
  <p>How can i fix this error?</p>