In the example string below I have 5 times #A# and 11 times #B# but preg_match_all returns only one match for #A# and 0 matches for #B#. Any idea how to solve this ?
$string = '<div>#Α#</div><div i="">#Α#</div><div i=""><a href="#Β#" class="" s="" p="65" t="4"></a><a href="#Β#" class="" s="" p="65" t="4"></a><a href="#Β#" class="" s="" p="68" t="4"></a><a href="#Β#" class="" s=""></a><a href="#Β#" class="" s="" p="75" t="2"></a><a href="#Β#" class="" s=""></a><a href="#Β#" class="" s="" p="65" t="3"></a><a href="#Β#" class="" s="" p="60" t="4"></a><a href="#Β#" class="" s=""></a><a href="#Β#" class="" s="" p="60" t="4"></a><a href="#Β#" class="" s="sv_plus" p="75" t="3"></a><noscript><center><h1 style="color:red;font-size:50px">#A#</h1></center><div>#Α#</div></noscript><div>#Α#</div>';
preg_match_all("/\#A\#/",$string,$matches);
print_r($matches); //return only one match instead 5
preg_match_all("/\#B\#/",$string,$matches);
print_r($matches); //return zero matches instead 11