private bool alphnumericratio(string temp) { string clean = Regex.Replace(temp, @"[^a-zA-Z0-9]", ""); if ((double)clean.Length / (double)temp.Length <= 0.5) return false; else return true; }