You don't actually tell us what is going wrong, so I'm guessing that the "href" attribute value is coming back as something like
http://www.someurl.com/path/to/file.php" target=
The basic problem is that the "+" quantifier is greedy and tries to match as many characters as possible, and when applied to the '.' operator this means that it will try to grab all characters to the end of the string. It will then start to backtrack (because the rest of the pattern will repeatedly fail) until it gets the the "=" after "target".
Now there are several solutions but none (that I know of) that can be used with the 'ereg' family of funcitons because they use the POSIX regex syntax and POSIX does not have the 'extra features' needed to solve this problem.
If you can switch to using the 'preg' family of functions (which are supposedly faster but certainly do provide for more "modern" regex BLOCKED EXPRESSION then making the first match group quantifier non-greedy as in:
<a href="(.+?)"(.+)>(.+)</a>
will provide the matches you indicate.
Note that the preg functions require the pattern to be delimited (I've used the '#' character) and the 'i' modifier specified to get back the 'case insensitive' matching. So the function call would something like (can't test this but the idea is OK):
preg_replace('#<a href="(.+?)"(.+)>(.+)</a>#i', '$3: $1", $text);
Susan