Page 1 of 1

Placing Text Elsewhere in html document

Posted: Tue May 28, 2013 6:41 pm
by Steve_L
Ok...I am really having some trouble trying to figure this one out....hopefully someone will have an answer for me as I am still learning this.

I have some text between tags that I need to copy and place between another set of tags on another line.

Example:
I have text between an H1 tag on line 30 that I want to take and put between H2 tags on line 20 and eliminate the text that was previously between the H2 tags and then delete line 30.

Line 20: <h2>H2 Sample Text</h2>

Line 30: <h1>H1 Sample Text</h1>

Can someone tell me if this can be done?

Re: Placing Text Elsewhere in html document

Posted: Thu Jun 06, 2013 10:14 am
by DigitalVolcano
Sorry, I don't think this can be done - you can't specify actions to happen on certain lines.

You can grab H1 text using

<h1>(.*)</h1>

and replace with H2 using

<h2>$1</h2>

but that will only replace the H1 tag with a H2 on the same line.