/

HTML / CSS / JavaScript Tutorial

JavaScript regular expression method: test()

[this page | pdf | back links]

The test() method (when applied to a JavaScript regular expression) seeks a match in a string and returns true if found, otherwise false.

 

It has the following syntax with the following parameters. It returns a Boolean as above.

 

RegExprObject.test(string)

 

Parameter

Required / Optional

Description

string

Required

The string to be searched

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript Regular Expressions


Desktop view | Switch to Mobile