function urltest($text)
{
$extensions = 'com|org|net|gov|edu|mil|us|info|biz|ws|name|mobi|cc|tv|jp';
$patterns = array(
'#([\s{}\(\)\[\]])(([a-z]+?)://([a-z_0-9\-]+\.([^\s{}\(\)\[\]]+[^\s,\.\;{}\(\)\[\]])))#ie',
"#([\s{}\(\)\[\]])([a-z0-9\-\.]+[a-z0-9\-])\.($extensions)((?:/[^\s{}\(\)\[\]]*[^\.,\s{}\(\)\[\]]?)?)#ie"
);
$replacements = array(
"'$1<a href=\"$2\" title=\"$2\">' . 'Link' . '</a>'",
"'$1<a href=\"
http://$2.$3$4\" title=\"
http://$2.$3$4\">' . 'Link' . '</a>'"
$text = preg_replace($patterns, $replacements, $text); <------ この行でエラー出る。何かおかしいですか?
return($text);
}