$re = '/(^\-?0[\,\.][0-9]{1,}$)|(^\-?[1-9][0-9]{1,}$)|(^[0-9]$)|(^\-?[1-9][0-9]{0,}[\,\.][0-9]{1,}$)|(^\-?[1-9]$)/m';
$str = '01
001
033
0000033
00000.2
00000000000000
01010101010
0000.0
aaa
???!!!!!
111%$$$$
-0
-
-100
-100.255
-10.25555
-1.2
-1335354.12
-22
-2
-1
-13353544366564547
-0.22222298
-0.2
-0,2989080
-6767676767676767677676767677676
-0.22
-123
-1
100.255
10.25555
1.2
1335354.12
22
2
1
13353544366564547
0.22222298
0.2
0,2989080
6767676767676767677676767677676
0
0.22
123';
preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0);
// Print the entire match result
var_dump($matches);
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for PHP, please visit: http://php.net/manual/en/ref.pcre.php