<?php $strs = [' 2,564.30', '-2,564.30']; print_r(preg_replace('~^-\K|[^-\d.]~', '', $strs));
You have javascript disabled. You will not be able to edit any code.