JSFiddle - React, Tailwind, and code Playground

JavaScript

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]);