^([1-9]\d*)$|^(\d+\.\d)$|^(\d+\.\d\d)$
$a = ".10";$zz = '/^([1-9]\d*)$|^(\d+\.\d)$|^(\d+\.\d\d)$/';var_dump(preg_match($zz,$a));