title: Regex: capture only if the entire line contains a pattern
body: <p>New to regex..</p>
  
  <p>I'm trying to find a way to capture all characters up until the first underscore but only for lines that don't contain "-NEW" anywhere in the line. </p>
  
  <p>So, in the example below, the first line would result in no group 1 match since the line contains "-NEW". 
  The remaining lines would all have the first part up to and excluding the first underscore captured as a group 1 match. 
  Is this possible with regex?</p>
  
  <p>skipme_garbage-NEW_nothing<br>
  <strong>takeme</strong>_garbage_some-otherstuff<br>
  <strong>takemetoo</strong>_some_more_garbage<br>
  <strong>alsotakeme</strong>_0</p>