3v4l.org

run code in 300+ PHP versions simultaneously
<?php $re = '/\[[^][\d]*\K\d+(?:\.\d+)?(?=[^][]*])/'; $str = 'I have the following expression [+₪7.00], I wish to extract only 7.00 or 7.'; if (preg_match_all($re, $str, $matches)) { print_r($matches[0]); }

This is an error 500

Value for `_results` contains invalid data `array`


preferences:
165.08 ms | 1993 KiB | 12 Q