最近做新浪应用
要把@example 替换为<a href="http://weibo.com/n/example">@example</a>在别人的帮助下写了一段正则表达式   $t = preg_replace( "/ *@([\x{4e00}-\x{9fa5}A-Za-z0-9_]*) ?/u", " <a href=\"http://t.sina.com.cn/n/\\1\" target=\"_blank\">@\\1</a> ", $t);发现如果是正常的微博昵称 就替换正常但是一旦遇到“@-example”之类的,有“-”的昵称,就会自动在“-”前面加一个空格 ,变成@ -example请问各位大侠,问题出在哪里?谢谢~\(≧▽≦)/~啦啦啦