Hello, @brian-krontz, @ekopalypse, @terry-r @alan-kilborn, @makwana-prahlad and All,
To @makwana-prahlad :
Why are you using such a complicated script, with some advanced options of sed ?
To my mind, the one-line script, below, does the job nicely, too ;-))
sed -n "/^\x0C/,+5d ; /(Continued)/d ; p" Input.txt > Output.txt
Notes :
First, sed searches, in the Input.txt file, for a range of lines :
The first line of this range must contain the FF char, at beginning of current line, so the /^\x0C/ syntax
Till the next 5 lines, that is to say, till the 6th empty line. Thus, the ,+5 syntax
Then, the d command deletes this range of entire lines
Secondly, sed searches if the next 7th line contains the (Continued) string, with that exact case, so the syntax /(Continued)/ , and, in that case, the d command, again, deletes this current line
Finally, if none of these criteria can be verified, the p command simply rewrites the current line in the Output.txt file
Indeed, not the same philosophy at usual N++ regexes, but rather easy to understand, too !
Cheers,
guy038
P.S. :
My sed script is not totally exact ! Indeed, if a line, located outside the header zone, contains the string (Continued), this line is wrongly deleted ! But, anyway, we’re on a Notepad++ forum, after all ;-))