标签:中间 str single lin ret star summary turn sum
/// <summary> /// 截取中间字符 /// </summary> /// <param name="text">全字符串</param> /// <param name="start">开始字符串 </param> /// <param name="end">结束字符串 </param> /// <returns></returns> public static string Substring(string text,string start,string end) { Regex regex = new Regex("(?<=(" + start + "))[.\\s\\S]*?(?=(" + end + "))", RegexOptions.Multiline | RegexOptions.Singleline); return regex.Match(text).Value; }
标签:中间 str single lin ret star summary turn sum
原文地址:https://www.cnblogs.com/Wonderful-Life/p/9831483.html