title: JS remove everything after the last occurrence of a character
body: <p>Okay I have this</p>
  
  <pre><code>var URL = "http://stackoverflow.com/questions/10767815/remove-everything-before-the-last-occurrence-of-a-character";
  console.log(URL.substring(URL.lastIndexOf("/")));
  </code></pre>
  
  <p>Gives you "/remove-everything-before-the-last-occurrence-of-a-character"</p>
  
  <p>How do I get "<code>http://stackoverflow.com/questions/10767815/</code>"</p>