Possible Duplicate:
Is there an alternative to string.Replace that is case-insensitive?
I’m looking for alternative to:
string str = "data ... ";
string replace = "data";
str = str.Replace(replace, "new value");
str = str.Replace(replace.ToLower(),"new value");
if possible using no regex.
Thanks in advance.
Without Regex, I don’t know.
With Regex, it would give you something like this :
I found an interesting article here, with a sample code that looks to work faster than Regex.Replace : http://www.codeproject.com/KB/string/fastestcscaseinsstringrep.aspx