A practical PHP function code, regular expression verification of the correctness of the phone number and query phone number attribution, the following look at the function of the specific code:
View SOURCEPRINT?01
02//Mobile phone Number
A regular expression that matches a Chinese character: [U4e00-u9fa5] matches double-byte characters (including Chinese characters): [^x00-xff] Apply: Computes the length of a string (a double-byte character length meter, 2,ascii character count 1)
I believe that people who have studied PHP well should know the following sentences for eamil verification, but there is not much that can be read:
The following are the referenced contents:
if (Eregi (^[_.0-9a-z-]+@) ([0-9a-z][0-9a-z-]+.) +[a-z]{2
Recently, an old friend of mine called me for help. He has worked as a journalist for many years and recently gained the right to publish many of his early columns. He wanted to put his work on the web, but his columns were saved as plain text files,
PHP function instance, based on the regular expression to judge the browser's default language, in fact, PHP Judge browser language using Super global variable _server["http_accept_language"] can be obtained, Then according to the HTTP request
This article is mainly on the JavaScript Date object format into a string implementation of the method is introduced in detail, the need for friends can come to the reference, I hope to help you. JavaScript provides the date format is too simple,
This article describes how to get the length of the mixed string in Chinese and English under JavaScript, here is a good tutorial, interested friends can refer to the following A colleague posted a post on the company's OA, describing how to get
This article mainly introduces the JavaScript automatically adds the link to the text URL address the method, the need friend may refer to the The implementation of the URL address to add automatically is a little bit of content: detection and
This article mainly introduces the JS verification phone number and mobile phone support +86 regular expression. Need friends can come to the reference, I hope to help you. The code is as follows:
Use JS Regular expression to verify the phone number, email address, zip code. Need friends can come to the reference, I hope to help you. Cell phone number verification (13 opening and 158,159 beginning, total 11 bits) code as follows: Var re;
I like to quote this phrase, "program is management of complexity." The computer world is a huge and abstract complex. We simply pack something and release the new tools. Now consider the language you are using to include some built-in abstract
This article mainly introduces the JS control text box only input numbers and decimal point of the method, example analysis of JavaScript using regular expression to achieve the limit of numbers and decimal point of the skills, has a certain
This article is mainly on the JS regular expression in the Test,exec,match method of the difference is introduced, the need for friends can come to the reference, I hope to help you. The difference of Test,exec,match method in JS regular
This article is mainly on the JS regular test,match,exec was introduced, the need for friends can come to the reference, I hope to help you. Regular expression GI I can not understand the beginning, I found it from the Internet, and now I share
This article is mainly about the use of the match function in JavaScript in a detailed summary of the introduction, the need for friends can come to the reference, I hope to help you. The match function in JavaScript uses a regular expression to
This article mainly introduced the JS judgment undefined type realization method, needs the friend to be possible to refer to under Code is as follows: if (revalue== undefined) { alert ("undefined");} found that the judge does not come out,
This article mainly introduces the JavaScript uses a tag to obtain the current directory absolute path method, this article explains the method to be quite special, needs the friend to be possible to refer to under
When it comes to path-related
This article mainly introduces the use of regular expressions in JavaScript, very detailed, with a simple example, recommended here.
How to use
1. Create an expression
Methods for creating regular expression classes in javascript:
var regex =
Use of GREP commands in Linux
grep (Global search Regular expression (RE) and print out of the line, a comprehensive search for regular expressions and print out rows) is a powerful text search tool that uses regular expressions to search for text.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service