I'm trying to use Google Script pull any number of URLs from a chunk of text in a Google spreadsheet cell.
My current script seems to log the same URL twice despite there being additional URLs. The same regex seems to work fine in the regex101 validator. The script I'm using is below and the logged response on the same content seen in the regex101 example is [http://dianeravitch.net/, dianeravitch.net/].
function findURL() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheets()[1];
var range = sheet.getRange(4,3);
var entry = range.getValue();
var regExp = new RegExp("https?:\/\/([^\"]*)", "gmi");
var urlsFound = regExp.exec(entry);
Logger.log(urlsFound);
}