replace all non numeric characters c# code example
Example 1: c# replace all non numeric characters
var input = "+33 06 06-78-75 aze";
var result = new string(input.Where(c => char.IsDigit(c)).ToArray());
//result => "3306067875"
Example 2: remove all non number in c#
public static string RemoveNonNumeric(string value) => Regex.Replace(value, "[^0-9]", "");