RE: [PHP] Stripping IMG tags
| From: | Martin Towell | Date: | Sun, 11 Nov 2001 23:38:34 +0000 |
| Subject: | RE: [PHP] Stripping IMG tags | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-74197@lists.php.net to get a copy of this message | ||
does this work?
eregi_replace("<img[^>]*>","",$string);
-----Original Message-----
From: Richard S. Crawford [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
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/)
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