preg_match_all("|a[[:space:]]href=\"?.[>]>(.[<])</a>|i", $sting, $links, PREG_PATTERN_ORDER);
while(list(,$link) = each($links[1])) {
// do something with $link here
}
That should do it, but test it out, I modified it from another piece of code that I had, and haven't tested it.