这个字符串应该如何截取? Label.Text在页面上显示的值是{"error":0,"x":"AAA","y":"CCC"}我想分别截取Label.Text中的X:后面的AAA和y:后面的BBB(当然AAA和CCC只是举个例子,真实的AAA和CCC是动态数据)我想得出:Label2.Text=AAA;Label7.Text=CCC; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 直接split('') 函数不就可以了么 string labtxt = @"{""error"":0,""x"":""AAA"",""y"":""CCC""}"; Match mlab = Regex.Match(labtxt, @"""(x|y)"":""(?<value>[^""]*?)"""); string XValue = mlab.Groups[2].Captures[0].Value; string YValue = mlab.NextMatch().Groups[2].Captures[0].Value; 关于页面传值的问题 关于sokcet有关技术 .net问题 如何实现异步下载 用membership控制文件夹访问权限 请教DataSet 的Merge方法 我用gridview里的DataKeyNames属性为什么传了值。 如何使用Web服务? 动态绑定的GRIDWIEW动态设置BoundField列的HtmlEncode属性 属性封装匿名函数的的意义何在? sqlserver和access存储过程的区别 Repeater 循环的问题 求个思路?谢!
Match mlab = Regex.Match(labtxt, @"""(x|y)"":""(?<value>[^""]*?)""");
string XValue = mlab.Groups[2].Captures[0].Value;
string YValue = mlab.NextMatch().Groups[2].Captures[0].Value;