errority 2021-04-02 10:00 采纳率: 0%
浏览 33

Java正则表达式如何分析ping的消息

PING baidu.com (220.181.38.148) 56(84) bytes of data.
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=1 ttl=50 time=42.4 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=2 ttl=50 time=41.6 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=3 ttl=50 time=41.8 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=4 ttl=50 time=41.8 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=5 ttl=50 time=41.7 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=6 ttl=50 time=41.7 ms
64 bytes from 220.181.38.148 (220.181.38.148): icmp_seq=7 ttl=50 time=42.5 ms
^C
--- baidu.com ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6011ms
rtt min/avg/max/mdev = 41.618/41.958/42.527/0.351 ms
 

 

比如这样一串数据,怎么拿到发送,丢包率等信息

  • 写回答

2条回答 默认 最新

  • SoftwareTeacher 《编程之美》作者 2021-04-02 10:09
    关注
    评论

报告相同问题?