string img="{"treeId":11498,"treeName":"冲绳","imgId":11424,"imgName":"冲绳"}"; string regex = @"(\d+)"; System.Text.RegularExpressions.Match mstr = Regex.Match(img, regex); string imgId = mstr.Groups[1].Value.ToString();
string img="{"treeId":11498,"treeName":"冲绳","imgId":11424,"imgName":"冲绳"}"; string regex = @"(\d+)"; System.Text.RegularExpressions.Match mstr = Regex.Match(img, regex); string imgId = mstr.Groups[1].Value.ToString();
转载于:https://www.cnblogs.com/wangchuang/p/5555362.html