The test() method accepts one parameter: the string to test against the pattern. Then, you can use the test() method available on the regular expression to check if the string matches the regular expression or not. To test whether a string matches a regular expression, you must first create a regular expression instance. Testing Strings against Regular Expressions
0 Comments
Leave a Reply. |