rlemon
11-10-2006, 06:36 PM
<?
$html = file_get_contents("http://en.wikipedia.org/wiki/Wikipedia:Featured_articles");
$pattern = '(\<span class\=\"featured\_article\_metadata has\_been\_on\_main\_page\"\>\<a href\=\").*([\w]+)(\" title\=\".*[\w]+\"\>.*[\w]+\<\/a\>\<\/span\>)';
$outputArray = preg_match_all($pattern,$html,$matches);
print_r($matches)
?>
i run this and receive
Warning: preg_match_all(): Unknown modifier '.' in /home/www/roblem.100webspace.net/Wiki.php on line 4
Array ( )
Any ideas?
i need to pull things from the wikipedia page for personal use but am too lazey too do it by hand, if you were wondering why i'm doing this.
$html = file_get_contents("http://en.wikipedia.org/wiki/Wikipedia:Featured_articles");
$pattern = '(\<span class\=\"featured\_article\_metadata has\_been\_on\_main\_page\"\>\<a href\=\").*([\w]+)(\" title\=\".*[\w]+\"\>.*[\w]+\<\/a\>\<\/span\>)';
$outputArray = preg_match_all($pattern,$html,$matches);
print_r($matches)
?>
i run this and receive
Warning: preg_match_all(): Unknown modifier '.' in /home/www/roblem.100webspace.net/Wiki.php on line 4
Array ( )
Any ideas?
i need to pull things from the wikipedia page for personal use but am too lazey too do it by hand, if you were wondering why i'm doing this.