A
A
Anton2019-12-22 19:57:13
Notepad++
Anton, 2019-12-22 19:57:13

What program can delete N lines before a character/word and/or after?

Hello.
The array of strings is large, about 20 thousand. I didn't find regular notepad++ for strings.
There is text:
111
222
333
AAA
444
555
666
You need to delete 1 line before and 2 after "AAA".
What editor can do that? Excel is not offered.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2019-12-22
@hunk3r

https://regex101.com/r/KdjqL3/1
Find: [^\n]+\n(ААА)(\r?\n[^\n]+){2}
Replace:$1

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question