And, to be more accurate, i must mention, that simply looking for closing ">" may be incorrect. This character may be found in "title" attribute for link or even (i wonder) in "href".
But if you don't need to be superaccurate and just want to get the result, in most cases mentioned regexp would be nice enough.