I have a Google Apps Script I need to extract the IP's, the problem is that they could be in the same line:
or in two lines:
When the IP's are in the same line everything works properly:
function regtest (){
//In this cell I have gmail content
var data = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("LOG").getRange("C364").getValue();
var regex = new RegExp(/\- Destination ip address\(es\):(.*)/);
var e = regex.exec(data);
Logger.log(e);
}
But i don't know how to extract the IP's when they are in different lines...
Could someone help me?



