Extrair URLs de JavaScript de String
//use the regex
let url = string.match(/\bhttps?:\/\/\S+/gi);
Potato Poteto
//use the regex
let url = string.match(/\bhttps?:\/\/\S+/gi);