title: In Notepad++ replace all lines except ones that match to given expression, using regex
body: <p>I saw here some answers that might help me if I'll combine them together but I can't seem to figure out how to do it properly.</p>
  
  <p>Lets assume we have a following text file:<br/></p>
  
  <pre><code>aaaaaaaaaaaaaaaaaaaaaa
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  aaaaaaaaaaaaaaaaaaaaaaaaaaa
  [a]
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaa[h]
  aaaaaaaaaaaaaaaaaaaaaa
  aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
  
  [a]
  aaaaaaaaaaaaaaaaaaaaaaaa[h]
  aaaaaaaaaaaaaaaaaaaaaaaaaaa
  </code></pre>
  
  <p>Where:</p>
  
  <ul>
  <li>"a" means literally any character (or set of characters), including special symbols, unicode characters etc.</li>
  <li>"h" is a fixed latin character</li>
  <li>brackets mean brackets</li>
  <li>blank line is a blank line</li>
  </ul>
  
  <p>Then:</p>
  
  <ul>
  <li>How do I keep only lines with [h] at the end replacing everything else with bank lines? (means carriage return remains)</li>
  <li>How do I keep the same lines but also remove [h]?</li>
  </ul>
  
  <blockquote>
    <p><br/>
    <br/>
    <br/>
    <br/>
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaa[h]<br/>
    <br/>
    <br/>
    <br/>
    <br/>
    aaaaaaaaaaaaaaaaaaaaaaaa[h]<br/>
    <br/></p>
  </blockquote>
  
  <p>As title says, I guess what I need can be also described as: replace any line except the line that matches to the given expression.</p>