Hey, I found a way to print the lines which is just before a regular expression, not including the expression.
sed -n '/regexp/{n;p;}' myfile
Now I'm looking for a way to print all lines, exept the regular expression and also the line before the same regular expression.
I am not sure if I understand what you want because your explanation is in my eyes a bit different from what the command does. Maybe a grep -v is sufficient? Else you might want to post an example of your input and wanted output.