3v4l.org

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

preferences:
35.11 ms | 402 KiB | 5 Q