Well then, what exactly would stop you to use the solution I posted earlier?
(I thought you don’t want to use jQuery for it)
It’s not hard, here goes (not tested, just off the top of my head)
//Wrap it in a span with a predefined class
$('a.page').wrap('<span class="whatever">');
// will result in <a href="..." class="page"><span class="whatever">2</span></a>
</span>
//wrap it in a span with an auto generated class
$('a.page').wrap(function() {
return '<span class="'page- + $(this).text() + '">';
});
// will result in <a href="..." class="page"><span class="page-2">2</span></a>
</span>
EDIT : I know it won’t work; it will wrap the whole anchor tag; you need to use $(this).html(); will post an updated version – sorry! 