Regex to match all us phone number formats
public bool IsValidPhone(string Phone)
{
try
{
if (string.IsNullOrEmpty(Phone))
return false;
var r = new Regex(@"^\(?([0-9]{3})\)?[-.●]?([0-9]{3})[-.●]?([0-9]{4})$");
return r.IsMatch(Phone);
}
catch (Exception)
{
throw;
}
}
\(?\d{3}\)?-? *\d{3}-? *-?\d{4}