Hey there;
I'm working on creating a Wordpress plugin, but it turns out that my Regular Expressions-fu is lacking.
How can you replace all image files (jpg, gif, jpeg)?
I'm thinking a function with the following
- Receive HTML in a string
- Only replace image urls starting with http://example.com
- Replace the domain with http://example2.com
- Return HTML with image URLs replaced.
... But I can't for the life of me create a well-formed piece of code that does this for me.
Any ideas?