// 取出字符串中的数字 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.f2er.com/regex/362390.html