JavaScript match() Method: String Object
Description
The match() method is used to match a regular expression against a string.
Version
Implemented in JavaScript 1.2
Syntax
match(regExp)
Parameter
regExp : Name of the regular expression.
Example:
In the following web document match() method is used to match a regular expression in a given string.
View the example in the browser
Supported Browser
Internet Explorer 7 | Firefox 3.6 | Google Chrome 7 | Safari 5.0.1 | Opera 10 |
Yes | Yes | Yes | Yes | Yes |
See also:
JavaScript Core objects, methods, properties.
Previous: JavaScript link() Method: String Object
Next: JavaScript replace() Method: String Object
Test your Programming skills with w3resource's quiz.