我有一些串:
http://testinfo202/sites/apt/list/functioalnews/allitems.aspx
http://testinfo202/sites/eut/gz/list/baidu/allitems.aspx
http://testinfo202/sites/nat/list/regionalnews/allitems.aspx
我想得到list/后面的名字(functioalnews,baidu,regionalnews)
请问怎么做?
http://testinfo202/sites/apt/list/functioalnews/allitems.aspx
http://testinfo202/sites/eut/gz/list/baidu/allitems.aspx
http://testinfo202/sites/nat/list/regionalnews/allitems.aspx
我想得到list/后面的名字(functioalnews,baidu,regionalnews)
请问怎么做?
Regex reg = new Regex(ptn, RegexOptions.IgnoreCase);
Match m = reg.Match("http://testinfo202/sites/apt/list/functioalnews/allitems.aspx");
Console.WriteLine(m.Groups["word"].Value);