RE: [PHP] Stripping IMG tags

From: Date: Sun, 11 Nov 2001 23:41:59 +0000
Subject: RE: [PHP] Stripping IMG tags
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-74198@lists.php.net to get a copy of this message
Like a charm! Thanks for the quick help. At 03:38 PM 11/11/2001, Martin Towell wrote:
does this work? eregi_replace("<img[^>]*>","",$string); -----Original Message----- From: Richard S. Crawford [<mailto:rscrawford@mossroot.com>mailto:rscrawford@mossroot.com] Sent: Monday, November 12, 2001 10:38 AM To: php-general@lists.php.net Subject: [PHP] Stripping IMG tags 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>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!" -- PHP General Mailing List (<http://www.php.net/>http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
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 (#74198) next »