In the case of resolutions, I would want a trailing space to be mandatory: "100x100 foo.jpg" should work, whereas "100x100foo.jpg" should simply be treated as a file name. For resolutions, this means " +" instead of " *".

Right now, it seems that expression would also match "10% 100x100 50% 30% 50x50 30x30 foo.jpg", resulting in foo.jpg as the file name and... any of the percentages or resolutions as the one that is used. This is not appropriate, it should be either one absolute resolution, or one scaling factor, or nothing of the sort. To fix this, turning "))*" into "))?" or ")|)" should be enough.