Javascript Reference
Categories: regular expression

javascript regular expression test( )

@March 15, 2008, 1:22 a.m.
test( )Firefox/Netscape/NN 4 IE 4 ECMA 3  

test(string)

  

Returns Boolean 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 string contains a match for a pattern.

 
Parameters
 
  • The string to be searched.
 
Returned Value

Boolean value: true | false.


Powered by Linode.