title: Regex pattern that does not match certain extensions?
body: <p>I have this pattern written</p>
  
  <pre><code>^.*\.(?!jpg$|png$).+$
  </code></pre>
  
  <p>However there is a problem - this pattern matches file.name.jpg (2 dots) </p>
  
  <p>It works correctly (does not match) on filename.jpg. I am trying to figure out how to make it not match ANY .jpg files even if the file's name has 2 or more dots in it. I tried using a look behind but python complains about not using a fixed width (which I'm not exactly sure what that means, but the file name will be variable length.)</p>