Dapatkan URL dari String JavaScript
function Purify(text) {
var urlRegex = /^(https?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/;
return text.replace(urlRegex, function (url) {
return '<a class="text-blurple" target="_blank" href="' + url + '">' + url + '</a>';
})
}
Undefined