- <?php
- $str = '
- <p align="center"><img alt="1111" src="http://111.111.111/111.111" /></p><p>Artist : Circle II Circle
- Album : Consequence Of Power
- Label : AFM
- Genre : Metal
- Street date : 2010-00-00
- Quality : 217 kbps / 44.1kHz / Joint Stereo
- Encoder : Lame 3.97 -V2 vbr-new
- Size : 83.07 MB
- Time : 50:40 min
- Url : http://222.222.222/222.222</p><p>1. Whispers In Vain 5:24
- 2. Consequence Of Power 4:25
- 3. Out Of Nowhere 4:10
- 4. Remember 5:30
- 5. Mirage 5:05
- 6. Episodes Of Mania 5:09
- 7. Redemption 5:31
- 8. Take Back Yesterday 5:03
- 9. Anathema 5:16
- 10. Blood Of An Angel 5:07</p><p>Circle II Circles 5th studio album, Consequence Of Power,
- is clearly the ultimate masterpiece created by master
- vocalist Zak Stevens (ex Savatage) and his band! Strong
- hooks, heavy riffs and Zaks unique voice have all fused on
- Consequence Of Power to exceed their past catalogue. Watch
- out for your favorite album of 2010: Consequence Of Power
- by Circle II Circle!</p><p> </p><p> </p><p>http://333.333.333/333.333</p><a href=\'http://444.444.444/444.444\'>http://555.555.555/555.555</a>
- ';
- function remove_http($matches){
- return str_replace('http://','##########',$matches[0]);
- }
- $str = preg_replace_callback("/<a[^<>]*href=['"]*http:\/\/[^<>]*>http:\/\/[^<>]*<\/a>/i",'remove_http',$str);
- $str = preg_replace_callback("/<img[^<>]*src=['"]*(http:\/\/)[^<>]*>/i",'remove_http',$str);
- $str = preg_replace("/http:\/\/[^<>\r\n\s]*/i",'<a href="\0">\0</a>',$str);
- $str = str_replace('##########','http://',$str);
- echo $str;
- ?>
复制代码 求更简单的方法
[ 本帖最后由 gdtv 于 2010-10-11 14:40 编辑 ] |