Defining regular expressions with Notepad ++

I want to delete all lines to some ending line. So something like this:

These
lines 
  || that can contain numbers 123 or characters like |*{
will be removed
But the following lines
will 
remain.

I want to receive:

But the following lines
will 
remain.

I tried to search in regexp /removed$/and replace it with an empty string, but it says 0 matches.

How can i do this?

Thanks for any help!

+4
source share
1 answer

Make sure you check ". Matches the new line" and use .*removed\.$:

Note what you need .*at the beginning to combine everything before the end of the line, and you need to exit the literal .at the end.

In addition, Notepad ++ does not want smoothing around its regular expressions.

. , \. .

, .*removed\r?\n?.

screenshot

+5

Source: https://habr.com/ru/post/1533413/


All Articles