title: Regex NOT operator doesn't work
body: <p>I'm trying to filter files in a folder. I need the files that don't end with ".xml-test". The following regex works as expected (ok1,ok2,ok3 = false, ok4 = true)</p>
  
  <pre><code>String regex = ".+\\.xml\\-test$";
  boolean ok1 = Pattern.matches(regex, "database123.xml");
  boolean ok2 = Pattern.matches(regex, "database123.sql");
  boolean ok3 = Pattern.matches(regex, "log_file012.txt");
  boolean ok4 = Pattern.matches(regex, "database.xml-test");
  </code></pre>
  
  <p>Now I just need to negate it, but it doesn't work for some reason:</p>
  
  <pre><code>String regex = "^(.+\\.xml\\-test)$";
  </code></pre>
  
  <p>I still get ok1,ok2,ok3 = false, ok4 = true</p>
  
  <p>Any ideas? (As people pointed, this could be done easily without regex. But for arguments sake assume I have to use a single regex pattern and nothing else (ie !Pattern.matches(..); is also not allowed))</p>