截取中间字符

/// <summary>
/// 截取中间字符
/// </summary>
/// <param name="text">全字符串</param>
/// <param name="start">开始字符串 </param>
/// <param name="end">结束字符串 </param>
/// <returns></returns>
public string Substring(string text, string start, string end)
{
Regex rg = new Regex("(?<=(" + start + "))[.\\s\\S]*?(?=(" + end + "))", RegexOptions.Multiline | RegexOptions.Singleline);
string NameText = rg.Match(text).Value;
return NameText;
}

上一篇:【luogu2293】【bzoj1213】 [HNOI2004]高精度开根 [高精度]


下一篇:全差分运放浅析(转载)