function _b_html_to_text_autolink(&$contents) { //오토 링크
$pattern = "/(http|https|ftp|mms):\/\/[0-9a-z-]+([\._0-9a-z-]+)+(:[0-9]{2,4})?\/?"; // domain+port
$pattern .= "([\.~_0-9a-z-]+\/?)*"; // sub roots
$pattern .= "(\S+\.[_0-9a-z]+)?"; // file & extension string
$pattern .= "(\?[_0-9a-z#%&;=\-\+]+)*"; // parameters
$pattern .= '/i';
$replacement = "\\0";
$contents = preg_replace($pattern, $replacement, $contents, -1);
return $contents;
}
Posted by 알 수 없는 사용자
,