On Thursday 08 March 2001 09:19, you wrote:
> I'm putting together a regex to pull all of the urls out of a web page.
> Not the href tag, but just the url part of that tag.
>
> Here's what I've come up with:
>
> preg_match_all('/<.*href\s*=\s*(\"|\')?(.*?)(\s|\"|\'|>)/i', $html,
> $matches);
> for
I'm putting together a regex to pull all of the urls out of a web page. Not
the href tag, but just the url part of that tag.
Here's what I've come up with:
preg_match_all('/<.*href\s*=\s*(\"|\')?(.*?)(\s|\"|\'|>)/i', $html,
$matches);
foreach($matches[2] as $m) print "$m\n";
All regex masters p
2 matches
Mail list logo