I have a block of html that looks something like this;
<p><a href="docs/123.pdf">33</a></p>
There are basically hundreds of anchor links which I need to replace the href based on the anchor text. For example, I need to replace the link above with something like;
<a href="33.html">33</a>.
I will need to take the value 33 and do a lookup on my database to find the new link to replace the href with.
I need to keep it all in the original html as above!
How can I do this? Help!