I am trying to execute this function:
public function get_referring_domains(){
$pattern='/<p>Referring<b>Class C subnets<\/b>: <b>(.*?)<\/b> <\/p>/';
$result= preg_match_all($pattern, $this->dom, $matches, PREG_SET_ORDER);
return $result;
}
The result that I want to get is a number , as you can see in the pattern that I set, I want to get: ([0-9]+)... But I get 0 every time..why the pattern doesnt match?
This is what I am trying to match:
$pattern='/<p>Referring[\s]{1}<b>Class[\s]{1}C\ssubnets</b>:[\s]{1}<b>(.*?)</b>[\s]{1}</p>/i';
I get this:
preg_match_all() [function.preg-match-all]: Unknown modifier 'b'
<p>Referring <b>Class C subnets</b>: <b>4,613</b> </p>
It is part of an html page
UPDATE. changed to this: