kik ker
kik ker

Reputation: 1

Notepad++ how to select multiple text blocks that always start and finish with the same word?

i'm editing a huge text file and I want to delete multiple blocks of copy in this text file..

the blocks always start with START and end with END

is this possible?

I've used search & replace

and ^START starts ok, but I'm not sure how to select copy upto END

Upvotes: 0

Views: 1410

Answers (2)

vks
vks

Reputation: 67988

START[\s\S]*?END

Try this.This will select multiple lines as well.

See demo.

https://regex101.com/r/wZ0iA3/4

Upvotes: 0

Sergii Lagutin
Sergii Lagutin

Reputation: 10681

Use follow regex:

(?s)START.*?END

It matches with blocks which:

  • (?s) enable single line mode to search over few lines
  • start with START
  • end with END
  • don't contain END inside block.

Upvotes: 1

Related Questions