正则截取内容

 public string GetSubValue(string str, string s, string e)
        {
            Regex rg = new Regex("(?<=(" + s + "))[.\\s\\S]*?(?=(" + e + "))", RegexOptions.Multiline | RegexOptions.Singleline);
            return rg.Match(str).Value;
        }

 

posted on 2012-05-18 10:36  HOT SUMMER  阅读(373)  评论(0编辑  收藏  举报

导航