I have a variable which holds a relative link for an image. This image link file name can have various lengths. For example...
/v/vspfiles/assets/images/d-amazingamethyst.jpg
/v/vspfiles/assets/images/cdacarbon.jpg
I would like to extract from this variable only the filename with out the .jpg extention and without the preceeding path. So the first example above should return d-amazingamethyst
A Jquery answer is preferred but straight javascript is ok as well. Thanks