代码如下:
.",$l);
$l = preg_replace("/([ \t]|^)ftp\./i",".",$l);
$l = preg_replace("/(http:\/\/[^ )\r\n!]+)/i",
"\\1>",$l);
$l = preg_replace("/(https:\/\/[^ )\r\n!]+)/i",$l);
$l = preg_replace("/(ftp:\/\/[^ )\r\n!]+)/i",$l);
$l = preg_replace(
"/([-a-z0-9_]+(\.[_a-z0-9-]+)*@([a-z0-9-]+(\.[a-z0-9-]+)+))/i",
"\\1>",$l);
$new_text .= $l."\n";
}
return $new_text;
}
原文链接:https://www.f2er.com/php/23176.html