mno jestli to udelas v mysql tak ses maser :-) .. ja pouzivam
$x = PReg_Replace ("/(http:\/\/[_|-|A-Za-z0-9|]+[.]+[A-Za-z]{2,4}[-_~%#&=?.a-z0-9\/]*)/i", "<a href=\"\\1\">\\1</a>", $x);
$x = PReg_Replace ("/(\s)(www.[_|-|A-Za-z0-9|]+[.]+[A-Za-z]{2,4}[-_~%#&=?.a-z0-9\/]*)/i", "\\1<a href=\"http://\\2\">\\2</a>",$x);
$x = PReg_Replace ("/mailto:([_a-zA-Z0-9\.\-]+@[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4})/i","<a href=\"mailto:\\1\">\\1</a>",$x);