- preg_match_all: documentation ( source)
<?php
$input="dfdfdfdf <a href='dfgdfgdfgfgdfg' class='dfdfdfdfdf' ></a>";
$regexp = "<a\s[^>]*href=(\"??)([^\" >]*?)\\1[^>]*>(.*)<\/a>";
if(preg_match_all("/$regexp/", $input, $matches))
{
echo "find";
}
else
echo "No";