- 论坛徽章:
- 0
|
- <?php
- $str = '
- <a href="{A_PIC_SHOW}...">some_text</a>
- <a href="{A_RING_SHOW}...">some_text</a>
- <a href="{A_VIDEO_SHOW}...">some_text</a>
- <a href="{A_KJAVA_SHOW}...">some_text</a>
- <a href="{APP_WAP_HOST}wap_show...">some_text</a>
- ';
- $str = preg_replace('|<a[^>]*href="{A_[^>]*>(.*?)</a>|isx',"<font color=\"blue\"><u>\\1</u></font>",$str);
- $str = preg_replace('|{APP_WAP_HOST}wap_show|isx',"./show_prvw",$str);
- echo $str;
- ?>
复制代码
得到的结果如下:
<font color="blue"><u>some_text</u></font>
<font color="blue"><u>some_text</u></font>
<font color="blue"><u>some_text</u></font>
<font color="blue"><u>some_text</u></font>
<a href="./show_prvw...">some_text</a>
另外,不知最后一项你要的是
<a href="./show_prvw...">some_text</a>
还是
<a href="./show_prvw">some_text</a> |
|