读书人

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

发布时间: 2012-04-12 15:46:35 作者: rapoo

求一个正则表达式向腾讯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 

读书人网 >C#

热点推荐