求助一个正则表达式(C#),将1111.txt这个文件名取出来
http://localhost:3766/filedownload?s=Files%5c642&p=1&f=11222&o=1111.txt&pr=d
正则表达式C#
http://localhost:3766/filedownload?s=Files%5c642&p=1&f=11222&o=1111.txt&pr=d
正则表达式C#
解决方案 »
- 写了篇关于计算机图形学和OpenCV的帖子,处女作哦!!
- 怎么获取JavaScript得到的东西
- 急急急!!!!!!!如何在登陆成功后把用户名写进profile 救命啊
- asp.net网站的发布步骤与注意事项
- Onchanged没相应,为什么?
- 水晶报表显示问题:(下面这段为什么在DataGrid上显示出来了,而在crystalReportViewer1上面却是空白一片)???
- C#
- C#中,用treeView和spiltContainer怎么样实现左边菜单导航到右边不同的页面
- 关于多线程中变量的改变问题
- 这段A代码我应该插到B代码的那里?或有其它方法?
- 如何指定默认路径是桌面,不管是xp还是win7
- richtextBox里的rtf格式插入一段文字
string test2 = "http://localhost:3766/filedownload?s=Files%5c642&p=1&f=11222&pr=d&o=1111.txt"; Regex regex = new Regex(".*o=(?<o>[^&]*).*");
Match m1 = regex.Match(test1);
Match m2 = regex.Match(test2); Console.WriteLine(m1.Groups["o"].Value);
Console.WriteLine(m2.Groups["o"].Value);
string urlstr = "http://localhost:3766/filedownload?s=Files%5c642&p=1&f=11222&o=1111.txt&pr=d";
var filenames = urlstr.Split(new char[] { '&' }, StringSplitOptions.RemoveEmptyEntries).ToDictionary(x => x.Split('=')[0], p => p.Split('=')[1]);
Console.WriteLine(filenames["o"]);
Console.Read();