[PHP] removing html attributes by preg_replace

2003-02-17 Thread Tomas Lehuta
hello! could somebody please help me to build a regexp to strip some attributes from html code? i'd like to remove all class= attributes from html, but the example below seems not match i don't know what i'm doing wrong, this simply doesn't work! ?php $html = 'A href=http://www.anywhere.com;

[PHP] removing html...

2002-07-27 Thread JJ Harrison
Hi, I have search around on google/php.net to try and find a way to remove body, everything above ,/body and everything below it in a html page. eg. html head titletest/test /head body Blah Blah Blahbr /body /html would become: Blah Blah Blahbr I know how to use php to convert html to pure

RE: [PHP] removing html...

2002-07-27 Thread John Holmes
To: [EMAIL PROTECTED] Subject: [PHP] removing html... Hi, I have search around on google/php.net to try and find a way to remove body, everything above ,/body and everything below it in a html page. eg. html head titletest/test /head body Blah Blah Blahbr /body /html would become

RE: [PHP] removing html...

2002-07-27 Thread John Holmes
Or... preg_match(/body(.*)\/body/i,$html_text,$matches); ---John Holmes... -Original Message- From: JJ Harrison [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 27, 2002 9:41 AM To: [EMAIL PROTECTED] Subject: [PHP] removing html... Hi, I have search around on google/php.net

RE: [PHP] removing html...

2002-07-27 Thread John Holmes
I have search around on google/php.net to try and find a way to remove body, everything above ,/body and everything below it in a html page. FYI on the two methods I suggested: preg_match(/body(.*)\/body/i,$html_text,$matches); eregi(body(.*)/body,$html_text,$matches); Preg vs. Ereg

[PHP] Removing HTML codes using regexp

2001-02-25 Thread Toke Herkild
What if I want to replace all html codes from a string ? I've tried using : $myString = preg_replace('/*/, '', $myString); but that deletes all string... ( or everything from first '' ) ... Toke Herkild... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Removing HTML codes using regexp

2001-02-25 Thread Simon Garner
From: "Toke Herkild" [EMAIL PROTECTED] What if I want to replace all html codes from a string ? I've tried using : $myString = preg_replace('/*/, '', $myString); but that deletes all string... ( or everything from first '' ) ... Toke Herkild... Try striptags()