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