I am trying to write a jQuery snippet of code, that will parse an image name containing width, height, and extensions and assign those values to variables.
Image Name Format: DSCN0551-130x130.jpg (name-widthxheight.extension)
I want to try and pull our the width, the height, and the extension and assign them to variables.
By adding the anchor to the end, you can basically read the regex from right to left. And then after the leftmost
-that is relevant to your structure,.+matches anything that’s left (no matter what characters).