note 13483 added to function.ereg.php

From: Date: Mon, 18 Jun 2001 21:36:58 +0000
Subject: note 13483 added to function.ereg.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-14273@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. http://www.php.net/manual/en/function.ereg.php

« previous php.notes (#14273) next »