I am trying to get those matches from an html file. It has several statements on them looking like this:
links(6) = "chicas-con-juguetes.asp"
I am trying to extract them with this function:
public static function extract_all_vid_links($html){
$pattern="links([0-9]) = \"(.*).asp\"";
preg_match_all( "/$pattern/i", $html ,$out, PREG_SET_ORDER);
print_r($out);
// foreach($out as $values){
// echo $values[0]."<br/>";
// }
}
But it is not working!?!? why?
modified:
$pattern="links\([0-9]\) = \"(.*).asp\"";
preg_match_all( "/$pattern/i", $html ,$out, PREG_SET_ORDER);
Still doesn't work.
(and)characters if you don't want to create a new match-group, take a look here:links\(\d\).\s*in place