Posted by kosanovic on 10/12/07 15:12
Hello,
I'm bad at regular expressions. Would somebody help me:
I need to extract all URL to .jpg and .png pictures from a string
containing an HTML file (DOM wouldn't work well in what I need).
I've tried:
preg_match_all("/.jpg$|.png$/", $htmlfile, $Matches);
foreach ($Matches as $match)
{
echo $match."<br>";
}
without much success. Anybody can correct this to make it work?
Navigation:
[Reply to this message]
|