日期:2014-05-18 浏览次数:20745 次
string source = "24,"; Regex reg = new Regex("[0-23],"); string source2 = "24"; Regex reg2 = new Regex("[0-23]"); Console.Write(reg.IsMatch(source)); Console.WriteLine(); Console.Write(reg2.IsMatch(source2)); Console.ReadLine();