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;
        }
原文地址:https://www.cnblogs.com/huanyun/p/11350555.html