preg_replace certain html entities
due to xhtml restrictions, i have to remove all html entities that are not &amp; &gt; &lt; &quot;,etc.. decimal entities (&#123; etc) are not the problem, btw.
tried this code
but it fails..
also tried preg_replace_callback but it fails since the function that replaces the text is a class method.
and last of all, no luck with the /e flag to execute mulitple lines of php code..
Last edited by buraks78; 01-06-2005 at 05:38 PM.
I think you are on the right track with lookaheads (though 1 lookahead should be enough), but as far as I can see your pattern is requiring the semicolon to directly follow the ampersand, which doesn't seem to be what you want. try
No keyboard found. Press F1 to continue...
yep... that worked perfectly.. thank you very much.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)