Help with removing a big chunk of html

A place to try and solve your RegEx problems.
Post Reply
ikehook
Posts: 3
Joined: Sat Mar 14, 2015 6:18 am

Help with removing a big chunk of html

Post by ikehook »

Hello, I'm not very good at this. I'm trying to remove everything between

<tableXXXX>
remove this junk
<table/>

Or really between any html tags like

<p>
or this junk
<p/>

<td>
remove this
<td/>

I can't seem to get the content out, I did it once when it was all in a <tr> tag but everything I try with the other tags fails.

I just want to remove the old data and import new data into the same spot between the tags.


Thanks in advance for your help.
User avatar
DigitalVolcano
Site Admin
Posts: 1717
Joined: Thu Jun 09, 2011 10:04 am

Re: Help with removing a big chunk of html

Post by DigitalVolcano »

Would something like this help?

RegEx:

Code: Select all

<td>.*?<td/>
Replace:

Code: Select all

<td>New text</td>
You need the 'dot matches newline' option turned on if your tags span more than one line
Post Reply