<?php $s = "..d.....12.3..d.e!";if (preg_match('~\d+(?:\.\d+)?~', $s, $m)) { echo $m[0];}
Standard input is empty
12.3
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!