I have the following method:
public static bool isUeiFormatOK(string test)
{
string pattern = "[A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9][A-Za-z0-9]";
MatchCollection matches;
Regex regex = new Regex(pattern);
matches = regex.Matches(test);
if (matches.Count == 0)
return false;
return true;
}
This validates that a string is 12 characters and contains numbers or letters.
How do I say, that one of the char must be a number?