string input = "hello WoRlD"; string result = Regex.Replace(input, "world", "csharp", RegexOptions.IgnoreCase); Console.WriteLine(result); // prints "hello csharp"
C# string.Replace 不区分大小写
原文:https://www.cnblogs.com/networkpilot/p/15088655.html