title: Change file extension with javascript if URL has Querystring after it
body: <p>I use this nice piece of code here to replace all .svg files with .png's in older browsers, fantastic for backwards compatibility.</p>
  
  <p>However, been using shopify today and it, for some fantastic reason, it adds a query strong to the end of every asset it pulls from the CDN.</p>
  
  <pre><code>function supportsSVG() {
      return !! document.createElementNS &amp;&amp; !! document.createElementNS('http://www.w3.org/2000/svg','svg').createSVGRect;
  }
  
  if (!supportsSVG()) {
      var imgs = document.getElementsByTagName('img');
      var dotSVG = /.*\svg$/;
      for (var i = 0; i !== imgs.length; ++i) {
          if(imgs[i].src.match(dotSVG)) {
              imgs[i].src = imgs[i].src.slice(0, -8) + 'png';
          }
      }
  }
  </code></pre>
  
  <p>Now that targets img's with .svg at the end. But I can't figure out how to target .svg?1234 and replace svg with .png</p>
  
  <p>Anyone know the regex to target that?</p>