Use this:
Code:
<a( class="backlink")* href="(.+?)" id="(.+?)">(\d+)</a>
Three comments:
1. * means that it may or may not occur.
2. you forgot a space before "class", since you already applied one before "href".
3. \d+ is the easiest way to numbers.