<a href=\".\/(viewtopic.php\?f=15&t=[0-9]+)\" class=\"topictitle\">([#\w\s_\-!$%&()?.,'\":;{}\/\\|’=\[\]+\–\™ ]+)<\/a>
i have this regex ina ction when i use it in software like regex buddy its ok but when i use it in php it just dont work it .throw no error at all..but it produce zero result.
it is made to match this
<a href="./viewtopic.php?f=15&t=119871" class="topictitle">Twilight Graphic Novel</a>
the match is ok but when i write
this
<?php
$contents = file_get_contents($url);
preg_match_all("/<a href=\".\/(viewtopic.php\?f=15&t=[0-9]+)\" class=\"topictitle\">([#\w\s_\-!$%&()?.,'\":;{}\/\\|’=\[\]+\–\™ ]+)<\/a>/i",$contents,$out);
$len=count($out[0]);
echo $len;
?>
$len outputs is zero although when i used this in regexbuddy with the sample page source it worked like a charm..
any ideas?