I have a full path to an image, which I am using jQuery to read like this:
$(\'img.my_image\').attr(\'src\');
However I just want the f
var fileNameIndex = yourstring.lastIndexOf("/") + 1; var filename = yourstring.substr(fileNameIndex);