[b]最新网址正则表达式
[/b]
[url=http://)?(\w+\.)(\w+\.)(\w+)(/\w+)*/?(.html)?|http://\w+\.\w+/\w]http://)?(\w+\.)(\w+\.)(\w+)(/\w+)*/?(.html)?|http://\w+\.\w+/\w[/url]+|[《》【】()()★※@~#]|\s{2,}
第一部分替换正常的网址,第二部分替换微博的网址,第三部分替换常用的符号,第四部分把2个以上的空格替换为空
[b]示例文本
[/b]
[url=http://www.google.com/(http://bit.ly/ZNdRfn]http://www.google.com/(http://bit.ly/ZNdRfn[/url])
[url=http://www.baidu.com/aa/bb]www.baidu.com/aa/bb[/url]
[url=http://www.baidu.com/aa/bb/cc/]www.baidu.com/aa/bb/cc/[/url]
[url=http://www.baidu.com/boy/s3s.htmlhttp://www.google.com/3dSd.html]www.baidu.com/boy/s3s.htmlhttp://www.google.com/3dSd.html[/url]
看了示例,你就明了!