There are lots of URL finding regEx’s and I am probably missing a trick in being able to work out how to adapt them to my needs but RegEx and I do not get on.
Situation: I am loading dynamic content in with PHP/mySQL which contains various img tags with srcs that I need to modify.
E.g:
Blah blah <img src="/oldsite/images/image1.gif" alt="image blah" title="image blah" /> blah blah <img src="/otheroldsite/images/image2.gif" alt="image blah" title="image blah" />
I need to remove anything between img src=” and images/….
“anything” is the key bit here as I there may be a whole range of “root folders” in the content
to end up with
Blah blah <img src="images/image1.gif" alt="image blah" title="image blah" /> blah blah <img src="images/image2.gif" alt="image blah" title="image blah" />
Many thanks in advance, I know you guys can do it!
Use this: