php 正则金额验证

$money_reg = '/^[1-9]d*|^[1-9]d*.d+[1-9]$/';
if(!preg_match($money_reg, $money)){
$this->ajaxError('金额格式错误');
}
原文地址:https://www.cnblogs.com/phpwyl/p/10178060.html