string data = "[b]testing[b]12\r\n34[/b][/b] hello! [b]abcd[/b]";
richTextBox1.Text = data;
int n1 = 0;
int n2 = richTextBox1.Text.Length;
while ((n1 = richTextBox1.Text.IndexOf("[b]", n1)) != -1
&& (n2 = richTextBox1.Text.IndexOf("[/b]", n1)) != -1)
{
richTextBox1.Select(n1 + 3, n2 - n1 - 3);
using (var boldFont = new Font(richTextBox1.SelectionFont, FontStyle.Bold))
richTextBox1.SelectionFont = boldFont;
n1 = n2;
}
richTextBox1.Rtf = richTextBox1.Rtf.Replace("[b]", string.Empty);
richTextBox1.Rtf = richTextBox1.Rtf.Replace("[/b]", string.Empty);