Regular expressions are long-standing, and the Find-and-replace feature is very powerful, but templates are difficult to remember. The 2 methods of the match (), replace () of the string object in JavaScript use a regular expression template. When
Reproduced from others ' blogs, not originalA thorough understanding of the Exec and match methods in JavaScriptBefore reading this article, please read the following question:Title 17:read The following JavaScript code:var sometext= "web2.0. net2.0"
Differences between test, exec, and match in regular expressions and the use of parentheses, execmatch
Simple differences between test, exec, and match
1. test
Test returns a Boolean value to check whether the corresponding string contains a
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 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
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
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
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
Match Method
Performs a lookup on a string using the regular expression pattern and returns the result that contains the lookup as an array.
Stringobj.match (RGEXP)
Parameters
Stringobj
Required option. A string object or string literal to find it.
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.