RegEx Remove the Last Match Only
NZ Select last edited by
</td> </td <td> </td <p>ITEMS</p> </td> </td <td> </td> <td> </td <p>INDEX</p> </td> </td </tr> </tr <br> <br>
Is it possible to create a RegEx code to capture the last </td ?
My current code is
It matches the first td as well, such as
Thanks in advance!
astrosofista last edited by
Yes, by taking advantage of the greediness of
*symbol. Try the following:
Search: (?s).*\K</td.*? Replace: [leave empty]
Put the caret at the very beginning of the document, select the
Regular Expression modeand click only on
Alan Kilborn last edited by
There’s a technique to find the last match in a file, presented HERE. You might give that a try.