JavaScript String match()
JavaScript String match()
The match() method is used to match a string against a regular expression. It will return an array with the matches if matches are found or else null.
Syntax:-
Its syntax is:- string.match(match)
Return:-
Its return is:- array having matches else null
Further Explanation:-
Parameter | Description |
match | Required. The search value or a regular expression. |