The time and TTL capture groups were in the wrong order for Windows ping output. I converted the regex capture groups to named groups and also updated the regex to capture the Windows time<1ms output.
ping_parser.dart:
var seq = match.groupNames.contains('seq')
? match.namedGroup('seq')
: null;
var ttl = match.namedGroup('ttl');
var time = match.namedGroup('time');
sink.add(
PingData(
response: PingResponse(
ip: match.namedGroup('ip'),
// Summary
if (data.contains(summaryStr)) {
final match = summaryRgx.firstMatch(data);
var tx = match?.namedGroup('tx');
var rx = match?.namedGroup('rx');
String? time;
if ((match?.groupCount ?? 0) > 2) {
time = match?.namedGroup('time');
}
Thank you so much! This PR looks excellent and I must admit that I had missed issue #36 on accident. Thank you for covering this. I will review, merge, and publish asap.
The
time
andTTL
capture groups were in the wrong order for Windows ping output. I converted the regex capture groups to named groups and also updated the regex to capture the Windowstime<1ms
output.ping_parser.dart:
windows_ping.dart:
Ping command output:
Console output: