Re: [PHP] Extract printable text from web page using preg_match

2007-02-27 Thread M5
On 27-Feb-07, at 1:44 PM, Richard Lynch wrote: On Tue, February 27, 2007 11:47 am, M5 wrote: I am trying to write a regex function to extract the readable (visible, screen-rendered) portion of any web page. Specifically, I only want the text between the tags, excluding any

Re: [PHP] Extract printable text from web page using preg_match

2007-02-27 Thread Richard Lynch
On Tue, February 27, 2007 11:47 am, M5 wrote: > I am trying to write a regex function to extract the readable > (visible, screen-rendered) portion of any web page. Specifically, I > only want the text between the tags, excluding any

Re: [PHP] Extract printable text from web page using preg_match

2007-02-27 Thread Satyam
- Original Message - From: "M5" <[EMAIL PROTECTED]> To: Sent: Tuesday, February 27, 2007 6:47 PM Subject: [PHP] Extract printable text from web page using preg_match I am trying to write a regex function to extract the readable (visible, screen-rendered) portion

[PHP] Extract printable text from web page using preg_match

2007-02-27 Thread M5
I am trying to write a regex function to extract the readable (visible, screen-rendered) portion of any web page. Specifically, I only want the text between the tags, excluding any

Re: [PHP] Extract printable text from web page using preg_match

2007-02-27 Thread Martin ZvarĂ­k
I believe it is better to use strpos() in this case because it's faster. '); // not necessary $end = strpos(strtolower($website_code), ''); $code = substr($website_code, $start, $end-$start); echo strip_tags($code); // clean text ?> This is very simple, but there are many HTML parsers out the