fork download
  1. <?php
  2.  
  3. $s = "..d.....12.3..d.e!";
  4. if (preg_match('~\d+(?:\.\d+)?~', $s, $m)) {
  5. echo $m[0];
  6. }
Success #stdin #stdout 0.02s 23616KB
stdin
Standard input is empty
stdout
12.3