C#操作json数据时,对一个特定键的值进行修改
若strJson为字符串,值为{“ID”:"1","Code":"22","QuoteTime":"2013-12-12","Last":"22"};
Code也为字符串,值为88
strJson = Regex.Replace(strJson,"(?<=\"Code\":\")[^\",]*",Code);
之后,strJson值为{“ID”:"1","Code":"88","Last":"22"}
原文链接:https://www.f2er.com/regex/362217.html