Quite easy to do -
string str=@"'";
if (richTextBox1.Find(str)>0)
{
int pos=richTextBox1.Find(str);
richTextBox1.SelectionStart=pos;
richTextBox1.SelectionLength=str.Length;
richTextBox1.SelectionColor=Color.Green;
}
The code above can be modified to change the color for any text (use the
str
constant for that).