string xxx = "......."; string pat = "{\"userid\":[^}.]*?}"; //校验段 MatchCollection mc = new Regex (pat, RegexOptions.Multiline).Matches (xxx); //去除多行,返回校验集合 foreach (Match m in mc) { print(m.Value); }
C# 正则校验
原文:http://www.cnblogs.com/nnnnn/p/4444606.html