110,536
社区成员
发帖
与我相关
我的任务
分享
string ATCmdPattern = @"AT\^CKPD=(?<key>\w+)(,(?<time>\d+))*";
Regex ATCmdExpression = new Regex(ATCmdPattern, RegexOptions.Compiled);
if (!Regex.IsMatch(RecvMessage, ATCmdPattern)) return;
Match ATCmdMatch = ATCmdExpression.Match(RecvMessage);
if(ATCmdMatch.Groups["time"].Value.Length > 0)
m_time = ATCmdMatch.Groups["key"].Value;
m_key = ATCmdMatch.Groups["key"].Value;