Home Backend Development PHP Tutorial Regular verification of mobile phone number problem

Regular verification of mobile phone number problem

Sep 20, 2016 am 03:30 AM
asp.net css html javascript php

if (!preg_match('/0?(00|01|11|13|14|15|17|18)[0-9]{9}/', $tel)) {

<code>    }
    
    </code>
Copy after login

Why does this regex allow mobile phone numbers with more than 11 digits to pass through directly without reporting an error? 00 and 01 11 are customized, just ignore them
The regex is not very good. What is wrong? How should I write it?

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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to achieve gap effect on the card and coupon layout with gradient background? How to achieve gap effect on the card and coupon layout with gradient background? Apr 05, 2025 am 07:48 AM

Realize the gap effect of card coupon layout. When designing card coupon layout, you often encounter the need to add gaps on card coupons, especially when the background is gradient...

How to use CSS3 and JavaScript to achieve the effect of scattering and enlarging the surrounding pictures after clicking? How to use CSS3 and JavaScript to achieve the effect of scattering and enlarging the surrounding pictures after clicking? Apr 05, 2025 am 06:15 AM

To achieve the effect of scattering and enlarging the surrounding images after clicking on the image, many web designs need to achieve an interactive effect: click on a certain image to make the surrounding...

How to adjust the background icon and color settings through CSS to solve the problem of the icon being blocked when the mouse is suspended? How to adjust the background icon and color settings through CSS to solve the problem of the icon being blocked when the mouse is suspended? Apr 05, 2025 am 06:24 AM

How to solve the problem that the background icon is blocked by the background color when the mouse is suspended. When designing a web page, you often encounter this problem: when the mouse is suspended...

How to achieve gap effect in the card and coupon layout with gradient background? How to achieve gap effect in the card and coupon layout with gradient background? Apr 05, 2025 am 06:39 AM

How to achieve the gap effect in the card layout? When designing a card voucher layout, it is often necessary to create a gap effect at one corner or edge of the card voucher, especially...

Can Bootstrap directly implement horizontal waterfall flow layout? Can Bootstrap directly implement horizontal waterfall flow layout? Apr 05, 2025 am 07:15 AM

Using the Bootstrap framework to build horizontal waterfall flow layout Many developers hope to use the Bootstrap framework to quickly build web pages and achieve various complex layout effects...

How to achieve the gap effect in card and coupon layout under a gradient background? How to achieve the gap effect in card and coupon layout under a gradient background? Apr 05, 2025 am 06:33 AM

How to achieve the gap effect in the card layout? When designing card voucher layout, it is a common requirement to achieve the gap effect on the edge of card voucher. If the background is pure...

Which websites are suitable for learning and enjoying excellent CSS effects display? Which websites are suitable for learning and enjoying excellent CSS effects display? Apr 05, 2025 am 07:09 AM

Explore excellent CSS effect display website If you are interested in learning and appreciating various exquisite CSS effects, it is very important to find the right resources. regardless...

CSS overflow:auto is invalid. Is the negative value of the parent element z-index the culprit? CSS overflow:auto is invalid. Is the negative value of the parent element z-index the culprit? Apr 05, 2025 am 07:12 AM

CSS scroll bar failure troubleshooting: overflow:auto failure cause analysis In using CSS to set up container overflow:auto...

See all articles