string xxx = "fahjfhajfFSADFajsif242fAS#@$@%24";
Regex reg = new Regex(@"\d{1}", RegexOptions.IgnoreCase | RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture)
reg.Matches(xxx).Count;//数字有多少个
Regex reg = new Regex("([a-z]|[A-Z]){1}", RegexOptions.IgnoreCase | RegexOptions.Singleline | RegexOptions.IgnorePatternWhitespace | RegexOptions.ExplicitCapture);
reg.Matches(xxx).Count;//英文字母有多少个?
//剩下的就是其它了
温馨提示:答案为网友推荐,仅供参考