為什么結(jié)果是This is a link to http://www.wjigilmore.com/.?
<?php
$text = "This is a link to http://www.wjigilmore.com/.";
echo preg_replace("/http:\/\/(.*)\//","<a href = \"\${0}\">\${0}</a>",$text);
?>
不是應(yīng)該是This is a link to
<a herf ="http:// www.wjigilmore.com/">?http://www.wjigilmore.com/<a/>.嗎?
2017-04-23
注意是替換掉了