$text = preg_replace("/\s(www\.([a-z][a-z0-9_\..-]*[a-z]{2,6})([a-zA-Z0-9\/*?&%-]*))\s/i", " <a href=\"http://$1\">$2</a> ", $text);