[摘要]\?)[a-z0-9~#%&'_\+=:\?\.-]*)*)", "<a href=\"\\0\">\\0</a>&q...
\?)[a-z0-9~#%&'_\+=:\?\.-]*)*)", "<a href=\"\\0\">\\0</a>", $text);
return $text;
}
function convertMail($text)
{ $text = eregi_replace("([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3}))", "<a href='mailto:\\0'>\\0</a>", $text);
return $text;
}
function convertAllLinks($text)
{ $text = convertURLS($text);
$text = convertMail($text);
return $text;
}
?>
关键词:Email+URL的判断与自动转换函数