I have an image that gets placed on the page, and the dimensions are different depending on the image that is chosen. I'd like to use regex to replace the image dimensions so that they are always 200x200, but I'm not sure how to go about doing so. The image dimensions are apart of a string.
Example:
http://www.site.com/path/to/image/The-fly-300x194.jpg
but I'd like to have it be:
http://www.site.com/path/to/image/The-fly-200x200.jpg
I'm not sure how to go about changing that using regex. I could use str.replace or whatever, but the dimensions are different depending on the image.