The original Http://www.jb51.net/article/28007.htm JS regular function match, exec, test, search, replace, split use the introduction set, learning regular expression of friends can refer to.
Match Method Use the regular expression pattern to
Match methodPerforms a lookup on a string using the regular expression pattern and returns the result that contains the lookup as an array.Stringobj.match (RGEXP)ParametersStringobjRequired option. A string object or string literal to find
article transferred from http://www.jb51.net/article/28007.htmThe purpose is that the content can match the results of all matches, to a few common query keywords, easy to check the person see the article, JS regular match all JS Reg Next, the key
Match MethodUse the regular expression pattern to perform a lookup on a string and return the result that contains the lookup as an array.Stringobj.match (RGEXP)ParametersStringobjRequired option. A string object or string literal on which to
Match MethodUse the regular expression pattern to perform a lookup on a string and return the result that contains the lookup as an array.Stringobj.match (RGEXP)ParametersStringobjRequired option. A string object or string literal on which to
JS regular function match, exec, test, search, replace, split use the introduction set1.match MethodUse the regular expression pattern to perform a lookup on a string and return the result that contains the lookup as an array.Stringobj.match
The checksum is all made up of numbers
Copy Code code as follows:
function IsDigit (s)
{
var patrn=/^[0-9]{1,20}$/;
if (!patrn.exec (s)) return false
return True
}
Verify Login Name: Can only enter 5-20 letters
Source reference from: MSDN http://msdn.microsoft.com/zh-cn/library/hs600312
How regular expressions work
Regular Expression example
Related Topics
The Regular Expression Language element provides information about the character set, operator, and
Describes the usage of Regular Expressions in Python and python regular expressions.
I. Introduction
The regular expression (RE) provides the foundation for advanced text pattern matching, search, replacement, and other functions. A regular
The compile (pattern, flags=0) function compiles the regular expression pattern and returns a regular expression (Regex) object, which is returned for use by functions such as match (), search (), flags is the flag bit, Used to control whether
0x01 common meta-characters and special symbols1 . Matches any character except newline characters, excluding line breaks2 #F.O can match FAO, FOO, etc.3 4^match the start of a string5 #^from matches any string starting with from6 7 $ match end of
Pattern modifier
Pattern modifier--explain the modifiers used in regular expression patterns
Description
The following is a list of possible modifiers that are currently available in PCRE. The internal PCRE names of these modifiers are in
Description
The following is a list of possible modifiers that are currently available in PCRE. The internal PCRE names of these modifiers are in parentheses. The blanks and line breaks in the modifier are ignored, and other characters can cause
Verification number: ^ [0-9] * $
Verify the n-digit number: ^ \ d {n} $
Verify at least n digits: ^ \ d {n,} $
Verify m-n digits: ^ \ d {m, n} $
Verify the number starting with zero or zero: ^ (0 | [1-9] [0-9] *) $
Verify the positive number of two
The PHP pattern modifier, also known as the pattern modifier, is used outside the delimiters of regular expressions. It is mainly used to adjust the interpretation of regular expressions, and extends some functions of regular expressions in
Php + ajax + json provincial/municipal drop-down lists are linked. json transmission is used to verify that parameters are transmitted during login.The following code is reserved as a mark:Function (data ){// Alert (data );Var data1 = data. replace (
DescriptionThe following lists the delimiters that may be used in pcre. The inner PCRE names of these modifiers are in brackets. The space and line feed in the modifier are ignored. Other characters may cause errors.I (PCRE_CASELESS)If this modifier
Pattern ModifierPattern modifier-Describe the modifier used in Regular Expression PatternDescriptionThe following lists the delimiters that may be used in pcre. The inner PCRE names of these modifiers are in brackets. The space and line feed in the
The PCRE modifiers currently available are listed below. The names mentioned in parentheses are the names of these modifiers inside PCRE. The space in the pattern modifier, the newline character is ignored, and the other characters cause an
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.