http://@.cn.alibaba.com/athena/companyprofile/@.html
在一个页面中,有很多连接,有些在a标签里面,有些不在a标签里面。现在我想获取http://@.cn.alibaba.com/athena/companyprofile/@.html这个链接。
类似http://111.cn.alibaba.com/athena/companyprofile/111.html或者是http://222.cn.alibaba.com/athena/companyprofile/222.html
也就是说@的地方的变化的。
在一个页面中,有很多连接,有些在a标签里面,有些不在a标签里面。现在我想获取http://@.cn.alibaba.com/athena/companyprofile/@.html这个链接。
类似http://111.cn.alibaba.com/athena/companyprofile/111.html或者是http://222.cn.alibaba.com/athena/companyprofile/222.html
也就是说@的地方的变化的。
解决方案 »
- 【WPF】某些控件的某些事件为什么不能响应,必须手动添加?
- Microsoft JScript 运行时错误: 找不到成员。纠结死了!!
- 这个小例子会输出什么结果?
- 新手。。。。。。。。。。
- string 字符串怎么超长呀?
- 有什么办法让c#.net winform 程序生成的.exe文件自动运行?
- 求助webBrowser1控件的问题。谢谢!
- C#实现发送邮件的问题,请高手指点啊
- CSDN上的兄弟们,C#做的中小企业管理软件已经A发布了,欢迎您来测试
- 向Oracle数据库插入数据时报正在终止线程
- 如何在一个程序中调试其中的一个dll文件(dll有源码)
- 求正则表达 要求有点怪的 仔细看题目 100分献上
然后拼合字符串
return string.Format(strSql, "你想拼合的字符串");
如:
return string.Format(strSql, "111");
返回
http://111.cn.alibaba.com/athena/companyprofile/111.html
那位算法达人能用kmp算法show出来看看?
http://111.cn.alibaba.com/athena/companyprofile/111.html is match
Group[0]=http://111.cn.alibaba.com/athena/companyprofile/111.html
Group[1]=111
Group[2]=111
http://222.cn.alibaba.com/athena/companyprofile/222.html is match
Group[0]=http://222.cn.alibaba.com/athena/companyprofile/222.html
Group[1]=222
Group[2]=222
另外就是链接中的小数点要进行转义处理
(?i)http://[^\s/]+\.cn\.alibaba\.com/athena/companyprofile/[^.\s]+\.html