RegExLib.com - The first Regular Expression Library on the Web!

Please support RegExLib Sponsors

Sponsors

Regular Expression Details

Title Test Find Regex Pattern to replace any special character in a string by any specified character or sting in C#.NET
Expression
['`~!@#&$%^&*()-_=+{}|?><,.:;{}\"\\/\\[\\]]
Description
This Regular Expression Pattern can be used to replace any special character in a string by any other specific character or string. -------------------- Code Example:(in C#) -------------------- string SourceString = TextBox1.Text; string rgPattern = "['`~!@#&$%^&*()-_=+{}|?><,.:;{}\"\\/\\[\\]]"; Regex objRegEx = new Regex(rgPattern);
Matches
chandan`~Kumar@#Singh&*^
Non-Matches
chandan kumar singh
Author Rating: Not yet rated. Chandan Kumar
Source Developed on some requirement
Your Rating
Bad Good

Enter New Comment

Title
 
Name
 
Comment
 
Spammers suck - we apologize. Please enter the text shown below to enable your comment (not case sensitive - try as many times as you need to if the first ones are too hard):

Existing User Comments

Copyright © 2001-2018, RegexAdvice.com | ASP.NET Tutorials