title: Regex match each line
body: <p>I have a whole bunch of strings which I need to clean</p>
  
  <pre><code>    35653_3100552_26952012_cmp.xml.gz
      35653_3100552_26952012_cmp_delta.xml.gz
      35653_3100552_26952012_cmp_deltatemplate.txt.gz
      35653_3100552_26952012_cmp_template.txt.gz
      35653_3100552_26952030_cmp.xml.gz
      35653_3100552_26952030_cmp_delta.xml.gz
      35653_3100552_26952030_cmp_deltatemplate.txt.gz
      35653_3100552_26952030_cmp_template.txt.gz
      35653_3100552_26952044_cmp.xml.gz
      35653_3100552_26952044_cmp_delta.xml.gz
      35653_3100552_26952044_cmp_deltatemplate.txt.gz
      35653_3100552_26952044_cmp_template.txt.gz
      35653_3100552_26952063_cmp.xml.gz
      35653_3100552_26952063_cmp_delta.xml.gz
      35653_3100552_26952063_cmp_deltatemplate.txt.gz
      35653_3100552_26952063_cmp_template.txt.gz
      35653_3100552_26952075_cmp.xml.gz
      35653_3100552_26952075_cmp_delta.xml.gz
      35653_3100552_26952075_cmp_deltatemplate.txt.gz
      35653_3100552_26952075_cmp_template.txt.gz
      35653_3100552_26952086_cmp.xml.gz
      35653_3100552_26952086_cmp_delta.xml.gz
      35653_3100552_26952086_cmp_deltatemplate.txt.gz
      35653_3100552_26952086_cmp_template.txt.gz
      35653_3100552_26952105_cmp.xml.gz
      35653_3100552_26952105_cmp_delta.xml.gz
      35653_3100552_26952105_cmp_deltatemplate.txt.gz
      35653_3100552_26952105_cmp_template.txt.gz
  </code></pre>
  
  <p>I just want to keep the ones ending with <code>cmp.xml.gz</code>
  Everything else I want to remove as well as removing the empty spaces. </p>
  
  <p>I tried this <code>35653(.*)cmp_delta.xml.gz</code> but this just selects everything from the 2nd row all the way to the last row. </p>
  
  <p>So my question is, which regex can I use to remove every line which does not end with <code>cmp_delta.xml.gz</code>?</p>
  
  <p>Btw, I'm going to be using this regex inside Coda.</p>
  
  <p>Thanks</p>
  
  <p><strong>Update</strong></p>
  
  <p>Having tried the regex provided by Kendall and Key in the answers below, this is the result in Coda</p>
  
  <pre><code>    35653_3100552_26952012_cmp.xml.gz.lmp
      .lmp
      35653_3100552_26952012_cmp_deltatemplate.txt.gz.lmp
      35653_3100552_26952012_cmp_template.txt.gz.lmp
      35653_3100552_26952030_cmp.xml.gz.lmp
      .lmp
      35653_3100552_26952030_cmp_deltatemplate.txt.gz.lmp
      35653_3100552_26952030_cmp_template.txt.gz.lmp
      35653_3100552_26952044_cmp.xml.gz.lmp
      .lmp
      35653_3100552_26952044_cmp_deltatemplate.txt.gz.lmp
      35653_3100552_26952044_cmp_template.txt.gz.lmp
      35653_3100552_26952063_cmp.xml.gz.lmp
      .lmp
      35653_3100552_26952063_cmp_deltatemplate.txt.gz.lmp
      35653_3100552_26952063_cmp_template.txt.gz.lmp
      35653_3100552_26952075_cmp.xml.gz.lmp
      .lmp
      35653_3100552_26952075_cmp_deltatemplate.txt.gz.lmp
      35653_3100552_26952075_cmp_template.txt.gz.lmp
      35653_3100552_26952086_cmp.xml.gz.lmp
      .lmp
      35653_3100552_26952086_cmp_deltatemplate.txt.gz.lmp
      35653_3100552_26952086_cmp_template.txt.gz.lmp
      35653_3100552_26952105_cmp.xml.gz.lmp
      .lmp
      35653_3100552_26952105_cmp_deltatemplate.txt.gz.lmp
      35653_3100552_26952105_cmp_template.txt.gz.lmp
  </code></pre>