title: Escaping an equals sign in DOS batch string replacement command
body: <p>I need to replace some text in a JNLP file using a DOS batch file to tune it for the local machine.</p>
  
  <p>The problem is that the search pattern contains an equals sign which is messing up the string replacement in the batch file.</p>
  
  <p>I want to replace the line,</p>
  
  <pre><code>&lt;j2se version="1.5" initial-heap-size="100M" max-heap-size="100M"/&gt;
  </code></pre>
  
  <p>with specific settings for the initial and max heap sizes.</p>
  
  <p>For example at the moment I have,</p>
  
  <pre><code>for /f "tokens=* delims=" %%a in (%filePath%agility.jnlp) do (
  set str=%%a
  set str=!str:initial-heap-size="100M"=initial-heap-size="%min%M"!
  echo !str!&gt;&gt;%filePath%new.jnlp)
  </code></pre>
  
  <p>but the = in the search pattern is being read as part of the replacement command.</p>
  
  <p>How do I escape the equals sign so it is processed as text?</p>