note 32664 added to function.preg-match-all
| From: | blong at hdm dot com | Date: | Wed, 04 Jun 2003 02:35:57 +0000 |
| Subject: | note 32664 added to function.preg-match-all | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-49680@lists.php.net to get a copy of this message | ||
Here's how you get all the non-javascript links from an $html string...
$regex = "/<a\s(href=\"([^\"]*)\"|\\n|[^>])*>/";
preg_match_all($regex,$html,$matches);
$links = $matches[2];
----
Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+32664
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+32664&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+32664&report=yes