这样的正则表达式怎么写,立即给分!
例如
一个文本中包括:
http://www.sina.com.cn
www.163.com
<a href="http://www.sina.com.cn" target="_blank">http://www.sina.com.cn</a>
<img href="http://www.163.com/image.gif">
要求把第一行和第二行的数据替换成超连接的形式,第三、四行不变
即替换后的格式如下:
<a href="http://www.sina.com.cn" target="_blank">http://www.sina.com.cn</a>
<a href="www.163.com" target="_blank">www.163.com</a>
<a href="http://www.sina.com.cn" target="_blank">http://www.sina.com.cn</a>
<img href="http://www.163.com/image.gif">
该怎么写这样的正规表达式呢?
在线等,来者有分!