noraimonda4
New Member
I am trying to highlighting the the body part and tags part of Xml in different colors in rithtextbox. \[code\]Regex regExp = new Regex("<[^>]+>");foreach (Match match in regExp.Matches(richTextBox3.Text)){ richTextBox3.Select(match.Index, match.Length); richTextBox3.SelectionColor = Color.blue;} regExp = new Regex("(?!<[^>]+>)");foreach (Match match in regExp.Matches(richTextBox3.Text)){ richTextBox3.Select(match.Index, match.Length); richTextBox3.SelectionColor = Color.Green;} \[/code\]problem is its not matches the body part(other than tags)