📜  c# 替换不区分大小写的字符串 - C# 代码示例

📅  最后修改于: 2022-03-11 14:49:18.684000             🧑  作者: Mango

代码示例1
class Program
{
    static void Main()
    {
        string input = "hello WoRlD";
        string result = 
           Regex.Replace(input, "world", "csharp", RegexOptions.IgnoreCase);
        Console.WriteLine(result); // prints "hello csharp"
    }
}