if (cbOdmazatPo.Text == ";")
{
DeleteToChar(selectionStart, ';');
}
...
void DeleteToChar(int selectionStart, char chr)
{
var lineIndex = richTextBox1.GetLineFromCharIndex(selectionStart);
var start = richTextBox1.GetFirstCharIndexFromLine(lineIndex);
var charIndex = richTextBox1.Text.IndexOf(chr, start);
lineIndex = richTextBox1.GetLineFromCharIndex(charIndex);
var end = richTextBox1.GetFirstCharIndexFromLine(lineIndex);
richTextBox1.Text = richTextBox1.Text.Remove(start, end - start);
}