3v4l.org

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

preferences:
39.8 ms | 402 KiB | 5 Q