就是想验证一下是否符合-06:00~41:59的自定义时间范围
负的时候的小时只能是-06~-00
感觉是(-?0[0-6])写的不对
请指点
[code]
inValue = Console.ReadLine();
string msg = "";
string pattern = @"((-?0[0-6])(4[0-1])|([0-1][0-9])):([0-5][0-9])";
if (Regex.IsMatch(inValue, pattern))
{
  msg = "is -06:00~41:59";
}
else
{
  msg = "is not -06:00~41:59";
}
Console.WriteLine(msg);
[/code]