php判断千分位

php判断千分位

public function isThousandSeparatedNumber($number) {
return preg_match('/^[-]?\d{1,3}(,\d{3})*(\.\d+)?$/', $number) === 1;
}

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: