x/^X.*\n/d
Or
x/^X/+-d
Away from a terminal so probably subtly wrong.
given multi-line dot, spanning only part of a file, how do i construct
an Edit command to remove lines matching certain regular expression?
wanted to delete lines starting with one particular character; without
leaving an empty line behind, thus Edit s/X.+//d is not sufficient.