下面是有问题的代码:
ID = null;
Table = null;
Match CMD = Regex.Match(CommandString, @"create update command for (^[A-Za-z0-9 ]+$) Where_ID_=_(^[0-9]+$)"); //create update command for MARKSWhere_ID_=_11
if (CMD.Success)
{
Table = CMD.Groups[1].Value;
ID = CMD.Groups[2].Value;
return true;
}
每次返回 false
CommandString = "create update command for MARKS Where_ID_=_5"
为什么?