日期:2014-05-17 浏览次数:20547 次
string[] arr = System.Text.RegularExpressions.Regex.Split("aa123aa345bb","aa");
------解决方案--------------------
private string[] Test(string inpstr, string bstr, string estr) { string pstr = @"(?<="+bstr+").*?(?="+estr+")"; MatchCollection mc = Regex.Matchs(inpstr,pstr);//手打,可能有错 string[] rstrs = new string[mc.Count]; for(int i=0;i<mc.Count;i++) { rstrs[i] = mc[i].Value; } return rstrs; }
------解决方案--------------------
正则