note 13483 deleted from function.ereg by jimw
| From: | jimw@php.net | Date: | Fri, 02 Nov 2001 01:28:08 +0000 |
| Subject: | note 13483 deleted from function.ereg by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-20148@lists.php.net to get a copy of this message | ||
The code given by srivest@savoirfairelinux.net
25-Jan-2001 02:50 was not complete.
I'd suggest when stripping all links from a site:
$regexp = "(< *a *)([^>]*)(href *= *['\"]?)([^'\"
>]*)(['\" >])([^>]*>)";
By the way, when using this to strip a complete site, you'd also have to take all <frame
src="">. Use for this purpose the following regexp:
$regexp = "(< *frame *)([^>]*)(src *= *['\"]?)([^'\"
>]*)(['\" >])([^>]*>)";
As you can see, you can expend this to get a complete structure of your HTML-document.