The input string having multiple whitespaces, and the result should have only one white space left, other whitespaces must be replaced with string.Empty
Input String: +1 580 5691 234
or (435) 772-5992
Output String: +1 5805691234
or +1 4357725992
Regex.Replace(text, @"[^\d]", string.Empty)
replaces all the whitespaces.