- print_r: documentation ( source)
- preg_match_all: documentation ( source)
<?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]);
}