取出字符串中的数字----正则表达式
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();
posted on 2016-06-03 10:29 HOT SUMMER 阅读(2278) 评论(0) 编辑 收藏 举报