I'm trying to wrap div tags around anchor tags in an HTML document. I know the exact HTML that needs to be wrapped, but for some reason I'm having a hard time writing a script that can automate this.
Here's an example. I need to replace the first line with the second:
<div class="main-button-wrapper"><a class="main-button" name="HrUpload
How would you do this?