So, if I understand you correctly, you want to remove any parts that contain
Code:
<a href="whatever">text</a>
while preserving the text? You could just abuse the header/footer removal for that. For the given example, something like
ought to work. Remember to check you documents' source, though (the magic wand symbol).