首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

正则表达式向腾讯qq聊天界面那种匹配网址

2012-04-12 
求一个正则表达式向腾讯qq聊天界面那种匹配网址源字符串:dddddddddddhttp://www.rczjp.cn/A/B/C/index.asp

求一个正则表达式向腾讯qq聊天界面那种匹配网址
源字符串:dddddddddddhttp://www.rczjp.cn/A/B/C/index.aspx?cid=11&sid=22中文呢?

匹配后:http://www.rczjp.cn/A/B/C/index.aspx?cid=11&sid=22


谢过了!

[解决办法]

C# code
 string test_str = "dddddddddddhttp://www.rczjp.cn/A/B/C/index.aspx?cid=11&sid=22中文呢";                string pattern = @"(?i)http://[^\u4e00-\u9fa5]+";                test_str = Regex.Match(test_str, pattern).Value;//http://www.rczjp.cn/A/B/C/index.aspx?cid=11&sid=22 

热点排行