ASP .NET
This example is in C#.


namespace used:
System.Text.RegularExpressions

Syntax:
Regex.Replace(strToSearch,SearchString,ReplaceStri ng,RegexOptions.IgnoreCase);

Example:
string myString = "A Nice Man!";
string replacedString = Regex.Replace(myString,"nice","Bad",RegexOptions.I gnoreCase);

This will search for nice in the string myString and replace that with Bad in case insensitive manner.

Output: A Bad Man!