I want to replace any html image tag that contains a specific string inside the "src" attribute.
Example:
<img id="IMG1" src="cid:[email protected]"/>
Should be replaced with "SOME STRING".
Images that contain a valid URL must not be replaced:
<img id="IMG1" src="http://someurl/image.png"/>
Can someone help me getting the correct regular expression for that?
EDIT: This one is my basic example but it replaces every image tag. I tried to get it on my own but unfortunately it didn't work:
preg_replace("/<img[^>]+\>/i", "SOME STRING", $myBaseString)
Thanks a lot.
Philip