日期:2014-05-20  浏览次数:20524 次

提取字符串?
string   HY   =   "机械及行业设备/塑料机械/注塑机-机械及行业设备/塑料机械/吹膜机-五金工具/门窗五金/拉手-机械及行业设备/塑料机械/注塑机 "

从上面的行业里面得到:注塑机,吹膜机,拉手,注塑机
请问用程序怎么实现(asp.net)

------解决方案--------------------
string[] text= System.Text.RegularExpressions.Regex.Split( "AAA/BBBBBB/CCCC-EE/GGGGGG/OIOPOI-NMJ/kkasjd/WEQADZZX ", "- ");
string sRes = string.Empty;
for(int i=0;i <text.Length;i++)
{
text[i] = text[i].Substring(text[i].LastIndexOf( "/ ")+1);
sRes = sRes + ", "+ text[i];
}

Response.Write(sRes);