I need a preg_replace() pattern that can be used to solve the following problem.
I have an image link that needs to be changed based on the name of the image.
This url:
[login to view URL]**03254395**_GAMLS-****.jpg
is what we have to search for. The number portion of the url will be dynamic. The -0 will also be dynamic. It will be -0 or -1 etc based on how many images the home has.
What I need is _**if the image name is a -0**_ meaning the first image, I need to change the url to the one below.
[login to view URL]**03254395**[login to view URL]
Notice other portions of the source and target urls are different. The paths are the same except the source has a folder named addl_picst and the target has that folder named images.
Your deliverables will be a function I can pass a $content variable to that will spit back the content with the changed urls.