ereg() violence
| From: | Jesse Binam | Date: | Wed, 08 Nov 2000 04:09:37 +0000 |
| Subject: | ereg() violence | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-24256@lists.php.net to get a copy of this message | ||
I have been screwing with this thing for 7 hours and CANNOT get it to work.
When the author submits an html message the script needs to:
replace tags like <br>, <p>, <div> with \n
replace HTML codes with text equivelent like & with &
strip all other HTML tags that have no place in a text message like <b>,
<font>, etc.
and it would be nice if it would find the img tags and replace them with
something like <<http://www.isp.com/images/pic.jpg>>
But I am running into some serious problems!!
Either I can't get the regular expression right or it times out (possibly
because the regular expression is wrong)
I just don't know what to do. I think it would increase performance IF I
could somehow code it to replace only
what is there instead of searching for a every possible code whether it is
there or not.
Suggestions on this would be GREATLY appreciated
Jess