string source = "Hello India"; string expr = @"\b" + Regex.Escape("Hello") + @"\b"; source = Regex.Replace(source, expr, m => { return "World"; }, RegexOptions.IgnoreCase); Console.WriteLine(source);Replaces the word "Hello"|"hello"|"hELLO" with the word "World"