Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# replace string case insensitive

class Program
{
    static void Main()
    {
        string input = "hello WoRlD";
        string result = 
           Regex.Replace(input, "world", "csharp", RegexOptions.IgnoreCase);
        Console.WriteLine(result); // prints "hello csharp"
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #replace #string #case #insensitive
ADD COMMENT
Topic
Name
6+1 =