2013-06-25 67 views

回答

2

非正则表达式的方法:

bool match = str.Length == 12 
     && str.Take(11).All(Char.IsDigit) 
     && (Char.IsLetter(str[11]) || str[11] == '\0'); 
相关问题