Results 1 to 1 of 1
-
03-30-2010, 03:11 PM #1
- Join Date
- Apr 2008
- Location
- Boston, USA
- Posts
- 13,172
- Thanks
- 744
- Thanked 699 Times in 550 Posts
- Blog Entries
- 4
- Feedback Score
- 4 (100%)
Replace String Ignoring Case - ASP .NET
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!
Free Classified Ads & BUSINESS/PROFESSIONAL SOCIAL NETWORK
Similar Threads
-
Integrate SexyBookmarks into your Personal page with JavaScript
By JavaScriptBank in forum JavaScript & AJAXReplies: 0Last Post: 02-19-2010, 10:24 PM -
how can i filter string using regular expression
By Abina in forum PHPReplies: 1Last Post: 02-03-2010, 11:03 AM -
Replace exact string
By Abina in forum ColdFusionReplies: 1Last Post: 01-31-2010, 11:21 AM -
String Replace Function
By sunshine in forum JavaScript & AJAXReplies: 1Last Post: 01-04-2010, 04:46 PM -
Google Joins Europe Case Against Microsoft
By krates98 in forum GoogleReplies: 14Last Post: 02-25-2009, 10:49 PM


Reply With Quote

