title: Using repl.bat to extract text from XML to text
body: <p>I have used repl.bat to extract some lines from a text file successfully for a number of months. Unfortunately the output has changed to XML and it now has backslashes as delimiters in the XML tag.</p>
  
  <p>Here is what i was using when the output file was this</p>
  
  <pre><code>Job Notes=John Smith 123456 dd/MM/yyyy h:mm:ss PM 654321
  File Type=4
  Location=3
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>@echo off
  set "input=before.txt"
  set "output=after.txt"
  findstr /r /i /c:"^Job Notes=" "%input%" |repl ".*=(.*) (\d+) (\d+\/\d+\/\d+) \d+:\d+:\d+ .*" "Name=$1\r\nFile Number=$2\r\nDate=$3" x &gt;"%output%"
  findstr /r /i /c:"^File Type=" "%input%" &gt;&gt;"%output%"
  findstr /r /i /c:"^Location="  "%input%" &gt;&gt;"%output%"
  </code></pre>
  
  <p>The ouput is now XML </p>
  
  <pre><code>&lt;job_notes&gt;John Smith\123456\dd/MM/yyyy h:mm:ss PM\654321&lt;/job_notes&gt;
  &lt;file_type&gt;4&lt;/file_type&gt;
  &lt;location&gt;3&lt;/location&gt;
  </code></pre>
  
  <p>Not sure if this is the issue but the structure of the XML is</p>
  
  <pre><code>&lt;root&gt;
      &lt;job&gt;
           &lt;job_notes&gt;xxxxxxx&lt;/job_notes&gt;
           &lt;file_type&gt;x&lt;/file_type&gt;
           &lt;location&gt;x&lt;/location&gt;
       &lt;/job&gt;
  &lt;/root&gt;
  </code></pre>
  
  <p>Can't get a modified script to work.  Not sure if the issue is the structure of the XML file or the delimiters.</p>
  
  <p>Thanks       </p>