标签:字符 col name 获得 multi ons 中间 single sum
1 /// <summary> 2 /// 获得字符串中开始和结束字符串中间得值 3 /// </summary> 4 /// <param name="str">字符串</param> 5 /// <param name="s">开始</param> 6 /// <param name="e">结束</param> 7 /// <returns></returns> 8 public static string GetMidValue(string str, string s, string e) 9 { 10 Regex rg = new Regex("(?<=(" + s + "))[.\\s\\S]*?(?=(" + e + "))", RegexOptions.Multiline | RegexOptions.Singleline); 11 return s.Trim(‘\\‘) + rg.Match(str).Value + e.Trim(‘\\‘); 12 }
标签:字符 col name 获得 multi ons 中间 single sum
原文地址:http://www.cnblogs.com/Jeremy2001/p/7448851.html