The absence of profuse and gushing thanks for my regex tip here suggests to me:
1) You have not been back to the forum
2) You believe that line noise contributed to my suggestion
3) You can't get it to work any better than I can
In the case of #3, if I were you, I might try just writing a few likely tags into a nested "if" statement ...
CODE
if ($text=~ m/img\ssrc/) {
if ($text !~ /<br>|<em>|<a|<p>|<h/)
{print $text}
}
I just put in a few tags, and I have no idea whether something like that would meet your needs. Anyway, that one just prints the line if it is TRUE that "img src" IS in the text, AND the other tags are not, but you could do whatever you wanted, obviously.
Otherwise, true HTML tags parsing is quite the task. I'd suggest you take a look at Brad's code in the Sanitize module (or the plugin) to see what his parsing subroutine actually does.
Why turn to Brad? Cuz he's much smartrn me!