Here's another version using a Lambda:
For Each word As String In h_words Array.ForEach(Regex.Matches(RichTextBox1.Text, word, RegexOptions.IgnoreCase).Cast(Of Match).ToArray, _ Sub(x) RichTextBox1.Select(x.Index, x.Length)) RichTextBox1.SelectionColor = Color.Red Next
Cheers!
~Ace
If a post helps you in any way or solves your particular issue, please remember to use thePropose As Answer option or Vote As Helpful
Visit the Forum: TechLifeForum