Hi I’m quite new to javascript and I want to get extract a text but only a part of it. For example if it extracts this text:
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?
Try this:
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: