<?php
$ping = shell_exec("ping -c 5 192.168.1.1");
echo preg_replace("#min/avg/max/mdev = ([0-9])#","$1",$ping);
?>
Merci<?php
$ping = shell_exec("ping -c 5 192.168.1.1");
echo preg_replace("#min/avg/max/mdev = ([0-9])#","$1",$ping);
?>
Merci
tu peux tester ton masque en ligne, par exemple sur ce site : https://regex101.com/min/avg/max/mdev = 6.453/9.583/14.054/2.800 ms