2. preg_replace('!<a href="(.*)">(.*)<a/>!','<a href="\1">\2<a/>',$str)
4. preg_replace('!<a href="(.*)">(.*)<a/>!','<a href="
http://hu60.cn/\1&b=2">\2<a/>',$str)
5. 建议直接用你教过我的字符串替换,很明显,你需要被替换的内容都是固定的,因此没必要让正则上场
7. str_replace('<a href="read.php?a=1">阅读</a>','<a href="
http://hu60.cn/read.php?a=1&b=2">阅读</a>',$str);
8. 谢谢老虎,但是我要匹配的不是死的内容,死的内容我会!
我上面说的只是一个例子,该怎么用来正则实现替换呢??
9. preg_replace('!<a(.|s)href="(1)"1>!Uu','
http://hu60.cn/2&b=2',
10. '!<a(.|s)*href="(.|s)*"(.|s)*>!Uu' 就可以查找了
11. "!<a href="(.*)">(.*)</a>!uU"
12. "!\<a href=\"(.*)\"\>(.*)\</a\>!uU"
14. str_replace('="read.php','="
http://hu60.cn/read.php',$str);
@郑锋
15. str_replace('="read.php','="
http://hu60.cn/read.php',$str);
@郑锋 #
16. str_replace('="read.php','="
http://hu60.cn/read.php',$str);
@郑锋 ?