$content=preg_replace('`((?:https?|ftp?|http):\/\/([a-zA-Z0-9-.?=&_\/:]*)/?)`si','$1',$content);我由于需要要加一个函数'' 转换成 function domain($olddomain) {
//处理
$domain=''.$olddomain.'';
    return $domain;}想写成
$content=preg_replace('`((?:https?|ftp?|http):\/\/([a-zA-Z0-9-.?=&_\/:]*)/?)`si',domain('$1'),$content);
$content=preg_replace('`((?:https?|ftp?|http):\/\/([a-zA-Z0-9-.?=&_\/:]*)/?)`si',"domain('$1')",$content);
结果却不队 要么将domain不当函数.要么$1不当变量该如何写?