Попробуйте это:
$matches = array();
$string = '
<li class="page_item page-item-6"><a href="http://localhost/wordpress1006/?page_id=6">About us</a></li>
<li class="page_item page-item-12"><a href="http://localhost/wordpress1006/?page_id=12">Contact</a></li>
<li class="page_item page-item-10"><a href="http://localhost/wordpress1006/?page_id=10">Portfolio</a></li>
<li class="page_item page-item-8"><a href="http://localhost/wordpress1006/?page_id=8">Services</a></li>
';
preg_match_all('/href="(.*?)"/i', $string, $matches);
var_dump($matches[1]);
Вывод:
array
0 => string 'http://localhost/wordpress1006/?page_id=6' (length=41)
1 => string 'http://localhost/wordpress1006/?page_id=12' (length=42)
2 => string 'http://localhost/wordpress1006/?page_id=10' (length=42)
3 => string 'http://localhost/wordpress1006/?page_id=8' (length=41)
(обратите внимание, что это не удастся для более сложного HTML, и в этом случае я больше не буду использовать Regex, скорее что-то вроде Простой HTML DOM )