If you are just extracting, something like:
var lines = richTextBox1.Lines.Where(l => !l.StartsWith("#"));
Will work. If you want to update the RichTextBox
then do:
var lines = richTextBox1.Lines.Where(l => !l.StartsWith("#"));
richTextBox1.Text = String.Join("\r\n", lines);