Home > Backend Development > PHP Tutorial > php regular expression php regular expression non php regular expression verification php regular expression

php regular expression php regular expression non php regular expression verification php regular expression

WBOY
Release: 2016-07-29 08:49:49
Original
879 people have browsed it

<code>/^\d{n}$/  :验证n位的数字
/^\d{n,}$/ :验证至少n位数字
/^\d{m,n}$/  :验证m-n位的数字
/^(0|[<span>1-9</span>][<span>0-9</span>]*)$/  :验证零和非零开头的数字
/^[0-9]+(.[0-9]{2})?$/ :验证有两位小数的数字
/^[0-9]+(.[0-9]{1,3})?$/ :验证有1-3位小数的数字
/^\+?[<span>1-9</span>][<span>0-9</span>]*$/  :验证大于零的正整数:
/^\d.?\d*$/          :验证大于零的数:</code>
Copy after login
').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

The above introduces PHP regular verification, including PHP and regular content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template