Hi,
I'm trying to write a regular expression to modify URLs stored in a database (linking to photos on Flickr) so I can change the size of photos already on a site -
E.g. Replace: 4724575242_ca7d120609.jpg with 4724575242_ca7d120609_z.jpg in a URL such as:
http://farm2.static.flickr.com/1045/4724575242_ca7d120609.jpg
The only change is to add _z before the .jpg extension.
I imagined that a regular expression could be written which matches static.flickr.com then replace .jpg with _z.jpg but unfortunately my attempts have so far failed.
I wondered if any regex ninjas out there might be able to help me with this?
Any help would be greatly appreciated - David