Hi guys, I'm having a little trouble, I've tried a few things but I can't get what I want.

I have the following data:

Code:
<a href="/profile.php?id=34214" class="slink">User Abcd</a>
<a href="/profile.php?id=34243" class="slink">User Abcdef</a>
<a href="/profile.php?id=34213" class="slink">User Abcdefgh</a>
<a href="/profile.php?id=34214" class="slink">User Abcdefghij&nbsp;<small><sup>*</sup></small></a>
<a href="/profile.php?id=34211" class="slink">User Abcdefghijklm</a>
As you can see, One of the names of the links are different. I just want to match the name and the user ID.

I have tried the following:

PHP Code:
preg_match_all("<a href=\"\/profile.php\?id=(\d+)\" class=\"slink\">(.*?)<\/a>"...... 
It works fine, Appart from it also returns the &nbsp;<small> etc... (Which is what it's supposed to return)

But, I don't want that, How do I just not include it? As you see, it's not always there.

The following works, but not as expected:

PHP Code:
preg_match_all("<a href=\"\/profile.php\?id=(\d+)\" class=\"slink\">((\w+)&nbsp;.*?|(\w+))<\/a>"...... 
Code:
Array
(
    [0] => <a href="/profile.php?id=34213" class="slink">User Abcdefgh</a>
    [1] => 34213
    [2] => User Abcdefgh
    [3] => 
    [4] => User Abcdefgh
)
Array
(
    [0] => <a href="/profile.php?id=34214" class="slink">User Abcdefghij&nbsp;<small><sup>*</sup></small></a>
    [1] => 34214
    [2] => User Abcdefghij&nbsp;<small><sup>*</sup></small>
    [3] => User Abcdefghij
)
Hope you understand what i'm trying to get to.

Thanks.