My approach (in windows) would be

/time=(?<time>[^ ]+)/ =~ `ping 192.168.1.254 -n 1`
time #=> "1ms"

-- 
Posted via http://www.ruby-forum.com/.