Okay I have this
var URL = \"http://stackoverflow.com/questions/10767815/remove-everything-before-the-last-occurrence-of-a-character\"; console.log(URL.subst
Try this jsfiddle or run the code snippet.
var URL = "http://stackoverflow.com/questions/10767815/remove-everything-before-the-last-occurrence-of-a-character"; var myRegexp = /^(.*\/)/g; var match = myRegexp.exec(URL); alert(match[1]);