{"ScriptPreparationCode":"var text = \u0060\r\nFlow exporter exporter-ipf:\r\nExporter ddb node id: 0x5400100\r\n Description: LAB\r\n Destination: 10.0.10.20\r\n VRF: default (1)\r\n Destination UDP Port 9995\r\n Source Interface loopback0 (10.241.255.6)\r\n Export Version 5\r\n Exporter Statistics\r\n Number of Flow Records Exported 0\r\n Number of Export Packets Sent 0\r\n Number of Export Bytes Sent 0\r\n Number of Destination Unreachable Events 0\r\n Number of No Buffer Events 0\r\n Number of Packets Dropped (No Route to Host) 0\r\n Number of Packets Dropped (other) 0\r\n Number of Packets Dropped (LC to RP Error) 0\r\n Number of Packets Dropped (Output Drops) 0\r\n Time statistics were last cleared: Never\r\n\u0060;\r\nvar regex = /^\\s*Destination\\s(UDP|SCTP)\\sPort\\s(\\d\u002B)/;\r\n\r\nvar rows = text.split(/\\n/);","TestCases":[{"Name":"test","Code":"var out = rows.reduce((acc, row) =\u003E {\r\n if (regex.test(row)) {\r\n acc.push(row.match(regex));\r\n } else {\r\n \treturn acc\r\n }\r\n }, []);\r\n","IsDeferred":false},{"Name":"match","Code":"var out = rows.reduce((acc, row) =\u003E {\r\n var result = row.match(regex)\r\n if (result) {\r\n acc.push(result);\r\n } else {\r\n \treturn acc\r\n }\r\n }, []);","IsDeferred":false}]}