How to achive searching for multiple values in a textbox.
Ex: Using~s
This code can achieve only a single search in the text box.
private void button1_Click(object sender, EventArgs e)
{
int index = 0;
string temp = richTextBox1.Text;
richTextBox1.Text = "";
richTextBox1.Text = temp;
while (index < richTextBox1.Text.LastIndexOf(textBox1.Text))
{
richTextBox1.Find(textBox1.Text, index, richTextBox1.TextLength, RichTextBoxFinds.None);
richTextBox1.SelectionBackColor = Color.Yellow;
index = richTextBox1.Text.IndexOf(textBox1.Text, index) + 1;
}
this.timer1.Start();
}