0

I'm editing a HTML file on Notepad++, and the problem is that is a very big file, and I want to remove some unnecessary lines to work on it. The following code appears a lot in it, at the start of every page. I'd like to remove it. I know how to remove a entire line containing a given word, i.e., to remove only the line containing "jardinagem", i'd type in the find field: . *jardinagem. * (without the spaces)

But the problem is this specific code is 3, sometimes 4 lines. So, how do I do it?
There are other similar types of lines I want to remove, if I understand how to remove these ones, the others I can follow the example. Thanks in advance.

<DIV  style="z-index:25; position:absolute; left:10PX; top:0PX; width:558PX; height:21PX; " class="adornment10" >
<table width="553PX" border=0 cellpadding="0" cellspacing="0"><tr><td NOWRAP class="fontColor11" >JARDINAGEM COMPANY</td></tr></table>
</DIV>
1

1 Answer 1

0

Do this replacement in Notepad++.

Find what : <DIV.*?JARDINAGEM.*?</DIV>\r\n
Replace with : (nothing - leave blank)
Check : "Regular expression" and ". matches newline"
Click "Replace All".

Explanation :

  • .*? will match any string of characters, the ? means not-greedy match
  • \r\n means an end of line on Windows (Linux : \n, Mac : \r)
  • ". matches newline" will let matches to cross the line boundary.
1
  • Thanks. I will try. Commented Mar 7, 2023 at 17:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .