title: Regular Expression with findstr (ms-dos)
body: <p>I am trying to use ms-dos command findstr to find a string and eliminate it from the file.</p>
  
  <p>At the moment I can find an explicit string but I am really struggling with regular expressions.
  The file looks something like the below:</p>
  
  <pre><code>PLs - TULIP Report  
  Output_Format, PLS - TULIP REPORT  
  NUMLINES,    110907
  VARIABLE_TYPES,T1,T8,I,T9,T2,N,N,N  
  [[data below]]
  </code></pre>
  
  <p>The file is an export from some system and annoyingly has that header in it - so I would like to clean it before using SQL Loader to bring it into an Oracle database.</p>
  
  <p>There's more than just the one file and all would have the same type of header but ever so slightly different in every file.
  Although I am happy to first remove the first 2 lines using hardcoded values, e.g.:  </p>
  
  <pre><code>findstr /v "PLs - TULIP Report" "c:\myfiles\file1.PRO"  &gt; "c:\myfiles\file1.csv"&lt;/code&gt;&lt;br&gt;
  findstr /v "Output_Format, PLS - TULIP REPORT" "c:\myfiles\file1.csv" &gt; "c:\myfiles\file2.csv"
  </code></pre>
  
  <p><i>(note how I do that in 2 steps - any suggestions to make this happen in a single step, would be massivelly appreciated)</i></p>
  
  <p>The third line is mnore complicated for me, it will always be in that format:</p>
  
  <pre><code>NUMLINES,    110907
  </code></pre>
  
  <p>except that the number at the end would be different for each file. So how do I get to find this entire line using a regular expression? I have tried:</p>
  
  <pre><code>findstr /v /b /r "\D+ \s+ \d+"
  </code></pre>
  
  <p>but without any luck.</p>
  
  <p>FYI, the data in <code>[[data below]]</code> looks like<BR> </p>
  
  <pre><code>*,"00000161",456823,"017896532","FU",23.95,3.34,20.61
  </code></pre>
  
  <p>etc ..
  Obviously, I do not want to modify the data area.</p>
  
  <p>I hope the above makes sense,</p>
  
  <p>Thanks</p>