I'm trying to get the title from a string with an html link using this code:
<?php
$string = "<a href=/test>test link</a>";
$get_title = ereg_replace('<a href=[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]+>([[:alpha:]])+</a>', '\1', $string);
echo $string;
?>
however, it just spits out the same HTML link, a bit of help please?