In Notepad++ 6.9.1 I was able to do this by selecting Search->Replace... and putting the following regular expression in the "Find what:" field:
(^[^<>\n]+)\n|\n[^<>\n]+
Then leaving the "Replace with:" field empty and setting a Search Mode of "Regular Expression", leaving ". matches newline" unchecked, and pressing "Replace All".
How It Works
(^[^<>\n]+)\n|\n[^<>\n]+
is a Notepad++ Regular Expression.
(^[^<>\n]+)\n
Is a sub-expression that matches lines that don't start with <
or >
. This matches the first line of text in your example input "bsg23".
|
Indicates alternation between two sub-expressions
\n[^<>\n]+
Matches a newline followed by characters that are not <
, >
, or a newline. This matches the newlines at the end of lines that start with <
or >
and the following text on the next line.