/// <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;
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-16
  • 2021-10-11
  • 2022-02-09
  • 2022-02-16
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-09
  • 2021-07-05
  • 2021-09-04
  • 2022-12-23
  • 2021-10-30
相关资源
相似解决方案