Say I have the following:
This path could be anything, we basically want to get the
Working example here: http://jsfiddle.net/jkeyes/sxx3T/
var re = new RegExp(".*\/(.*)$"); var src="folder/foo/bar/x982j/second822.jpg"; var m = re.exec(src); alert(m[1]); // first group