JavaScript RegExp.prototype.test() MethodThe test() method of JavaScript executes a search for a match between a regular expression and a specified string. If the match is found, it will return true. Otherwise, it will return false. SyntaxParametersstring : The string to be searched. Return valueIt will return true if there is a match between the regular expression and the specified string. Otherwise, it will return false. Example 1Test it NowOutput: Matching and Return value : true Example 2Test it NowOutput: Matching and Return value : false Example 3Test it NowOutput: Match String : false Match String : true Next TopicJavaScript RegExp |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India