JavaScript Reference/Javascript Methods/match
"match()" Example
<html>
<body>
<button onclick="var myS = new String("Sample String");
alert(myS.match(/sam/i));">Match a string</button>
</body>
</html>
"match()" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |String |
+----------------+--------------------------------------------------------------+
"match()" Syntax, Parameters and Note
Note:
Searches the String using a regular expression.
Syntax:
stringName.match(param1)
Parameters:
param1 Required; the regular expression.