“URL Tıklanabilir JS Yapın” kodu Cevap

URL’yi tıkla JS yapmak
//////// posted by Programmer Rimon\\\\\\\\\\\\\
// Date: 07-02-2022 *D-M-Y*
function makeUrlsClickable(s) {
	if(!s) return '';
	// make URLs clickable
	s = s.replace(/(^|\s|>)(www\.([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|"|<|>|\"|<|>|$)/gi, '$1$2$4');
	return s.replace(/(^|\s|>)((?:http|https|ftp):\/\/([\w\#$%&~\/.\-\+;:=,\?\[\]@]+?))(,|\.|:|)?(?=\s|"|<|>|\"|<|>|$)/ig, '$1$2$4');
};