Here is a code snippet for removing non-numeric characters in C#.
{mobile_block=responsive_ad_728_90}
/// <summary>
/// Method deletes all non numeric characters from passed text
/// </summary>
/// <param name="text">string text</param>
/// <returns>string text without non-numeric characters</returns>
public static string RemoveNonNumeric(string text)
{
string newText = "";
if(String.IsNullOrEmpty(text))
{
return newText;
}
newText = Regex.Replace(text, "[^0-9]", "");
return newText;
}
{mobile_block=responsive_ad_2_300_250}