c# 取出字符串之间的字符串

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

 

posted @ 2019-08-14 10:52  天天的蓝色  阅读(772)  评论(0编辑  收藏  举报