Given the input
From fairest creatures we desire the increase,
That The reby the rose might never die,
Placeholders don't exist
But as tHe riper should by time decease,
I'd like to match the lines with case-insensitive variations of the, so it should also obtain the line with The reby and tHe riper above. I want to use sedto achieve this. I tried the command
sed -n "/\bthe\b/ip"
But it printed
p
p
p
If I try sed -n "/\bthe\b/pi" it prints
From fairest creatures we desire the increase,
That The reby the rose might never die,
But as tHe riper should by time decease,
So it's close, but it has the empty line. How can I remove it and get only the lines I want?