title: How to pull url file extension out of url string using javascript
body: <p>How do I find the file extension of a URL using javascript? 
  example URL:</p>
  
  <pre><code>http://www.adobe.com/products/flashplayer/include/marquee/design.swf?width=792&amp;height=294
  </code></pre>
  
  <p>I just want the 'swf' of the entire URL.
  I need it to find the extension if the url was also in the following format</p>
  
  <pre><code>http://www.adobe.com/products/flashplayer/include/marquee/design.swf
  </code></pre>
  
  <p>Obviously this URL does not have the parameters behind it.</p>
  
  <p>Anybody know?</p>
  
  <p>Thanks in advance</p>