title: Regex: Match everything except strings ending in a control group
body: <p>I'm scraping some websites and I would like to discard the calls made to common img files based on a regex. The regex function should be  </p>
  
  <p><strong>Match everything except URLs (string) ending in .jpg, .png, .gif</strong></p>
  
  <p>Examples:</p>
  
  <ul>
  <li>www.example.com/test.jpg </li>
  <li>www.example.com/test2.png</li>
  </ul>
  
  <p>I ‘ve  tried doing this </p>
  
  <pre><code>.*(?:(?!\.(jpg|png|gif)))$
  </code></pre>
  
  <p>But without any success</p>