Stripping IMG tags

From: Date: Sun, 11 Nov 2001 23:37:31 +0000
Subject: Stripping IMG tags
Groups: php.general 
Request: Send a blank email to php-general+get-74196@lists.php.net to get a copy of this message
All I need to do is strip out IMG tags from strings; I don't want to strip out all of the HTML, just the IMG tags, so the strip_tags() function won't be adequate. I've tried
        eregi_replace("<img[^$]>","",$string);
but that doesn't seem to do any good (though the regexp works fine in Perl). Any thoughts? Sliante, Richard S. Crawford http://www.mossroot.com mailto:rscrawford@mossroot.com AIM: Buffalo2K ICQ: 11646404 Y!: rscrawford "It is only with the heart that we see rightly; what is essential is invisible to the eye." --Antoine de Saint Exupéry "Push the button, Max!"

« previous php.general (#74196) next »