Viktor Carlson Viktor Carlson - 6 months ago 36
HTML Question

Notepad++ RexEx Remove everything between 2 html tags ( with line break between )

I want to remove in a html document with notepad++

everything between the marked area
enter image description here
So the Start point to remove is ( including )

and then everything between including CRLF
and then including
for the End ponint

I started simple with
and ticked enter image description here

and I tried to improve this starting point but always got either nothing was deleted or to much :)


Use <img.*?</a>[\r\n]*. The .* is too greedy. [\r\n]* will capture the whitespace after </a>.

enter image description here

Also, if you are only interested in matching <img with subsequent line breaks, you can use another regex: