c# parse to remove dashes from string code example Example: c# replace dash in string string result = Regex.Replace(inputString, @"[^0-9]", "");