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();