title: Regex in Python. NOT matches
body: <p>I'll go straight: I have a string like this (but with thousands of lines)</p>
  
  <pre><code>Ach-emos_2
  Ach. emos_54
  Achėmos_18
  Ąžuolas_4
  Somtehing else_2
  </code></pre>
  
  <p>and I need to remove lines that does not match <code>a-z</code> and <code>ąčęėįšųūž</code> plus <code>_</code> plus <code>any integer</code> (3rd and 4th lines match this). And this should be case insensitive. I think regex should be</p>
  
  <pre><code>[a-ząčęėįšųūž]+_\d+ #don't know where to put case insensitive modifier
  </code></pre>
  
  <p>But how should look a regex that matches lines that are NOT alpha (and lithuanian letters) plus underscore plus integer? I tried</p>
  
  <pre><code>re.sub(r'[^a-ząčęėįšųūž]+_\d+\n', '', words)
  </code></pre>
  
  <p>but no good.</p>
  
  <p>Thanks in advance, sorry if my english is not quite good.</p>