Hello,
simplicitylabs wrote:
but not
Maybe it's because of the " chars, try: You also could simplify your regex like this: @"(\<.*\>)" Apart from that I would suggest you to use the String class methods for this kind of simple validation (IndexOf). I now that regex is extremely powerfull, but it's also very expensive in terms of perfomance. Shortly I made a performance test because I had to validate a lot of strings very often in my application. I found out that using 3 IndexOf instead of a regex was much faster (more than 100 times faster).
simplicitylabs wrote:
Another strange behavior is it won't let me edit the colored tags once they have been "colorized".
I think it's not strange at all, as you are explicitly forcing it with: richTextBox1.SelectionProtected = true; Hope it helps! All the best, Martin