Hello, @lagey-raho, @alan-kilborn, @robin-cruise and All,
Finally, with your raw text, in reverse video, ( thanks for this inpuut ), we now know that all your lines do not contain any leading blank characters !
So, basically, from your last post, you want to delete any range of lines :
Beginning with the line Solution:•••••, with this exact caseAND
Ending right before a line containing upper-case letters and space characters, ONLYOR
Ending right before a line beginning with a number, immediately followed with a dot charOR
Ending at the very end of current file !I assume that it’s better to replace all these deleted blocks with a single empty line to get some kind of separation !
If so, this following regex S/R, expressed with the free-spacing mode (?x), should work :
SEARCH : (?xs-i) ^ \h* Solution: .+? (?= ^ (?: \u+ \x20+ )* \u{2,} $ | ^ \d+ \. | \z ) REPLACE : \r\n ( or '\n' only, if your file is an UNIX one )Best Regards,
guy038