2024-08-11 06:31:26
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;//英文字母有多少个?
//剩下的就是其它了
2024-08-11 20:05:36