当前位置:Gxlcms > PHP教程 > php正则验证php正则非php正则验证php正则表达式手

php正则验证php正则非php正则验证php正则表达式手

时间:2021-07-01 10:21:17 帮助过:23人阅读

/^\d{n}$/  :验证n位的数字
/^\d{n,}$/ :验证至少n位数字
/^\d{m,n}$/  :验证m-n位的数字
/^(0|[1-9][0-9]*)$/  :验证零和非零开头的数字
/^[0-9]+(.[0-9]{2})?$/ :验证有两位小数的数字
/^[0-9]+(.[0-9]{1,3})?$/ :验证有1-3位小数的数字
/^\+?[1-9][0-9]*$/  :验证大于零的正整数:
/^\d.?\d*$/          :验证大于零的数:

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i <= lines; i++) { $numbering.append($('
  • ').text(i)); }; $numbering.fadeIn(1700); }); });

    以上就介绍了php 正则验证,包括了php,正则方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

  • 人气教程排行