From http://www.w3schools.com (Copyright Refsnes Data)
JavaScript String Object
The match() method returns the matches when matching a string against a regular expression.
This method returns an array of information, or null if no match is found.
| stringObject.match(regexp) |
| Parameter | Description |
|---|---|
| regexp | Required. A regular expression object. Read more about the RegExp object |
ExamplePerform a global, case-insensitive search for "ain":
The output of the code above will be: Try it yourself » |
JavaScript String Object
From http://www.w3schools.com (Copyright Refsnes Data)