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

请问一个正则式的有关问题

2012-02-14 
请教一个正则式的问题SetrenewRegExpre.IgnoreCasetruere.GlobalTruere.Pattern((http|https|ftp|rts

请教一个正则式的问题
Set   re=new   RegExp
re.IgnoreCase   =true
re.Global=True
re.Pattern   =   "((http|https|ftp|rtsp|mms):(\/\/|\\\\){1}((\w)+[.]){1,}(net|com|cn|org|cc|tv|[0-9]{1,3})(\S*\/)((\S)+[.]{1}(gif|jpg|png|bmp))) "
Set   RemoteFile   =   re.Execute(strContent)
以上这段,请熟悉正则式的高手解释一下,谢谢啦!

[解决办法]
比如查找这个:
http://community.csdn.net/Expert/topic/5288/5288894.gif


((http|https|ftp|rtsp|mms):(\/\/|\\\\){1}
则匹配
http://

((\w)+[.]){1,}
则匹配
community.csdn.

(net|com|cn|org|cc|tv|[0-9]{1,3})
则匹配
net

(\S*\/)
则匹配
/Expert/topic/5288/

(\S)+[.]{1}
则匹配
5288894.

(gif|jpg|png|bmp)
则匹配
gif

热点排行