标签:log key code reg round 使用 需要 c# regex
有需求需要将json的字段转换为小写,使用正则表达式实现,代码如下
正则表达式为 \"[a-zA-Z0-9]+\"\s*:
MatchCollection ms = Regex.Matches(strJsonData, "\\\"[a-zA-Z0-9]+\\\"\\s*:"); foreach ( Match item in ms) { strJsonData.Replace(item.Value, item.Value.ToLower()); }
标签:log key code reg round 使用 需要 c# regex
原文地址:http://www.cnblogs.com/bfyx/p/6931935.html