RichEdit1.SelStart := RichEdit1.FindText('[c]',i2,MaxInt,[stMatchCase]); + RichEdit1.SelLength = 3; RichEdit1.SetText(#0);