string RegMac = "^([0-9a-fA-F]{2})(([0-9a-fA-F]{2}){5})$ ";
string strMac="***";(12位无 - 的十六进制数)
bool a=Regex.IsMatch(strMac, RegMac);
但为啥这个a老为false?
regmac应该没问题,我查的。请大神指点
------解决方案--------------------------------------------------------
string RegMac=@"^([0-9a-fA-F]{2}\-?){5}[0-9a-fA-F]{2}$";