title: groovy or java: how can replace '\' with '\\' 'C:\www\web-app\StudyReports\test.bat'
body: <p>My eventual goal is to have a string like</p>
  
  <pre><code>def newline = 'C:\\www\web-app\StudyReports\\test.bat'
  </code></pre>
  
  <p>but my old line only has one <code>'\'</code>.</p>
  
  <p>I tried different ways of using the following:</p>
  
  <pre><code>def newline = oldline.replaceAll(/\\/,'//')
  </code></pre>
  
  <p>but that did not compile.</p>