I have written the following code to do case insensitive replace in C#:
Regex.Replace(textBoxText,
Regex.Escape(findText),
replaceText,
RegexOptions.IgnoreCase);
Just wanted to check, whether this is the right approach, or is there a better approach and whether I'm overlooking something that I should better be aware of.
Note: Please don't provide me some hand crafted code, I had used a fast replace function from codeproject, and that code crashes at client side, and I have no way to know, what input the user was using. So, I prefer some simple but correct and reliable method.