If each of the pagenums have the <span class="pagenum"> and have no further embedded spans, then a simple regex would be
Code:
<span class="pagenum".+/span>
replace with nothing
you may need to insert a questionmark after the plus sign, to make it less greedy