PerlRob has asked for the wisdom of the Perl Monks concerning the following question:
Hi all,
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:
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:
How would you do this?<a class="main-button" name="HrUpload" href="javascript:doUploadAtachm +ent();" within="theForm"><span>Attach</span></a> <div class="main-button-wrapper"><a class="main-button" name="HrUpload +" href="javascript:doUploadAtachment();" within="theForm"><span>Attac +h</span></a></div>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Search and replace HTML
by wfsp (Abbot) on Jan 20, 2010 at 14:07 UTC | |
Re: Search and replace HTML
by Ratazong (Monsignor) on Jan 20, 2010 at 08:40 UTC | |
Re: Search and replace HTML
by leocharre (Priest) on Jan 20, 2010 at 13:51 UTC | |
Re: Search and replace HTML
by Anonymous Monk on Jan 20, 2010 at 08:34 UTC |
Back to
Seekers of Perl Wisdom