Yes, it does because it searches for "any character but >" inside the quotes, and that includes the closing quote and the href part.
You probably want something like this:
Code:
<a class="([^"]*?)" id="([^"]*?)"></a>
Anyway, an anchor with href and no text is pretty useless.