Return(result="success" dev_id="0" time="2013-05-06 16:04:19" id="456" name="张" card_src="from_door"  card_src="from_check"  type="face"  time="2013-05-06 16:04:19" id="456" name="张" card_src="from_door"  card_src="from_check"  type="face"  time="2013-05-06 16:04:19" id="456" name="张" card_src="from_door"  card_src="from_check"  type="face" 
time="2013-05-06 16:13:14" id="456" name="张" card_src="from_door"  card_src="from_check"  type="face" 
)
想得到这种结果
:"2013-05-06 16:04:19" "456" "张" "from_door" "from_check"  "face"
:"2013-05-06 16:04:19" "456" "张" "from_door" "from_check"  "face"
:"2013-05-06 16:04:19" "456" "张" "from_door" "from_check"  "face"
c#

解决方案 »

  1.   

    time="(.*?)"\s+id="(.*?)"\s+name="(.*?)"\s+card_src="(.*?)"\s+card_src="(.*?)"\s+type="(.*?)"
    正则取吧
      

  2.   

    using System.Text.RegularExpressions;  string htmlurl = File.ReadAllText(@"C:\1.txt", Encoding.GetEncoding("GB2312"));
                foreach (Match m in Regex.Matches(htmlurl, @" (?is)time=""([^""]*?)""\s*id=""([^""]*?)""\s*name=""([^""]*?)""\s*card_src=""([^""]*?)""\s*card_src=""([^""]*?)""\s*type=""([^""]*?)"""))
                {
                    Console.WriteLine(m.Groups[1].Value + " " + m.Groups[2].Value + " " + m.Groups[3].Value + " " + m.Groups[4].Value + " " + m.Groups[5].Value + " " + m.Groups[6].Value);
                }