Searches a string for matches to a regular expression or a string.
Syntax
Parameters
Returns
The search method indicates if a match is present or not. If a match is found, the search method returns an integer value that indicates the offset from the beginning of the string where the match occurred. If no match is found, it returns -1.
To get further information, use the match method. The method updates the contents of the RegExp object.