I want to find two consecutive non-empty lines.
AAA BBB AAA BBB AAA BBB AAA BBB
The file above shows four pairs of consecutive non-empty lines. All of the lines can have trailing white space
^\s*\S\+\n\s*\S+ But that does not do the job. Moreover, it does not account for trailing spaces. I tried
^\s*\S\+\s*$\n\s*\S+\s*$ too. But no luck again.
So, how do I search for such lines? And it would be great if you could explain your solution.