Extrahieren Sie URLs aus String javaScript

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