3v4l.org

run code in 300+ PHP versions simultaneously
<?php $string = 'And 7 should have value of £7.2'; $match = []; preg_match('/(?<= \W)\d(?:[\.\,]\d+)?/', $string, $match); var_export($match);

preferences:
63.85 ms | 402 KiB | 5 Q