Name
test() — NN 4 IE J3 ECMA n/a
Synopsis
test(string
)
Returns true
if there is a match of the regular
expression anywhere in the string passed as a parameter;
false
if not. No additional information is
available about the results of the search. This is the fastest way to
find out if a pattern matches within a string.
Returned Value
Boolean.
Parameters
-
string
The string to be searched.
Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.