honey_00.jpg :: 1200 x 1703 :: 369.39 KB
I want it to give me honey_00.jpg I don't want the other junk information. I only just want the file name. How can I do this?
var filename = str.match(/.+\.jpg/);
Note that this will only work if the filename is at the beginning of the string and you're fetching a .jpg file.
To match a .jpg, .png, or .gif file, you can use this:
var filename = str.match(/.+\.(jpg|png|gif)/);