Permalink
Browse files

make the regex take icmp_seq or icmp_req

  • Loading branch information...
1 parent bbc45ab commit 719a9bd96934b1053f321687f4cac872d620630f @reconbot committed Nov 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 ping.js
View
@@ -54,7 +54,7 @@ var ping = function(host, cb){
return cb(erorr,data);
}
- var re = /(\d+) bytes from (.+): icmp_seq=(\d+) ttl=(\d+) time=([\d.]+) ms/;
+ var re = /(\d+) bytes from (.+): icmp_(?:r|s)eq=(\d+) ttl=(\d+) time=([\d.]+) ms/;
var parts = data.msg.match(re);
if(!parts.length){

0 comments on commit 719a9bd

Please sign in to comment.