现在我有了一个eregi_replace问题:
我有这个
$subject = "This is for @codeworxx - you have to try first!";
$text = eregi_replace('(((@))[-a-zA-Z0-9]+)','<a href="http://www.google.de/\\1">\\1</a>', $subject);
echo $text;一切都很好,但是
<a href="http://www.google.com/@codeworxx">@codeworxx</a>但我想要这个:
<a href="http://www.google.com/codeworxx">codeworxx</a>怎么办?
谢谢,萨沙
发布于 2009-11-29 01:10:00
<?php
$subject = "This is for @codeworxx - you have to try first!";
$text = eregi_replace('@([-a-zA-Z0-9]+)','<a href="http://www.google.de/\\1">\\1</a>', $subject);
echo $text;https://stackoverflow.com/questions/1813024
复制相似问题