asp.net c# How do I remove all symbols (for example "\") from a text string. example 55555\444444 must be 55555444444
string cleanString = dirtyString.Replace("\\",""); .NET Framework SDK is an amazing thing to have i handy. Lot of code examples cya, /PatrikB
using ascii value of the char and number if you want only number and char i meand to say a-z , A-Z , 0-9 ascii value in between a-z , A-Z , 0-9 more info about ascii value http://www.asciivalue.com http://www.asciitable.com
This will remove all non alpha-numeric characters if that is what you are looking for string cleanString = Regex.Replace(dirtyString, "[^A-Za-z0-9]", "");
if it's just one char - use the Safe old Replace function Candy = Replace(Candy, "\", "") and if you need to replace the " character itself, just replace chr(34)