string txt = "{\"ip\": \"127.0.0.1\", \"port\": 80, \"status\": \"NULL\", \"type\": \"ee\", \"arg\": \"admin:123456\"},";
            Match m = Regex.Match(txt, @"""(.*?)"":(.*?),");
            while (m.Success)
            {
                string key = m.Groups[1].Value.Replace("\"", "").Replace(",", ""); ;
                string vule = m.Groups[2].Value;
                if (!dic.ContainsKey(key))
                    dic.Add(key, vule);
                m = m.NextMatch();
            }

 

相关文章: