I am using the code below to extract the URL from a string variable named description. It works but it will merge duplicated URLs.
let geturl = new RegExp(/(?:(?:https?|ftp|file):\/\/|www\.|ftp\.)(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[-A-Z0-9+&@#\/%=~_|$?!:,.])*(?:\([-A-Z0-9+&@#\/%=~_|$?!:,.]*\)|[A-Z0-9+&@#\/%=~_|$])/igm);
let urlExtracted = description.match(geturl);
Is there any method to change the code so that I could extract all the URLs in the order the URLs are being found in the variable even though they are duplicated?