C# 正则取值

int count = 0;
 

Match mtcTemp = Regex.Matches(xml, @"(?<=<SerialId>)[\d,\s]*(?=</SerialId)")[0];
                    if (null != mtcTemp && mtcTemp.Success)
                    {
                        log.e("DelContact", userNumber, string.Format("通讯录删除统计结果:{0},{1}", mtcTemp.Value, mtcTemp.Value.Split(',').Length));
                        count = mtcTemp.Value.Split(',').Length;
                    }

 


原文地址:https://www.cnblogs.com/ylemzhang/p/1963930.html