{ $url = '/(https?:\/\/\S+|www\.\S+)/i'; return preg_replace($url, '<a href="https://$0" target="_blank" title="$0">$0</a>', $metin); }