You want to remove the whole <img>, or just the bolded part? The bolded part is a little more complex, but the whole <img> is fairly straightforward. Anything that starts with <img (case insensitive) followed by one or more of anything NOT a > and ending with a >.
$text = preg_replace('/<img[^>]+>/ism','',$text);
The m and s cumulatively match/replace multiple lines and newlines, hence this would zap all images out of a given page.
tuuni
7:17 pm on Feb 25, 2011 (gmt 0)
Thank you for your input.
Yes, i would like to remove the whole row completely.
Note that i do not want to remove all "<img>" tags globally, but only the pattern i mentioned which starts with "<img src="http://sub.domain.com/~r/mycat/".