Syntax for creating a RegExp object:
1. var txt=new RegExp(pattern,attributes);
2. var txt=/pattern/attributes;
Which of the above mentioned syntax will correct?
Correct Answer : C
Which among the following regular expression specifies that password should contain at least one capital letter or one digit.
Which of the following string will match the RegEx "((d).(dd))$"?
var text = "lestfindcourse: 1, 2, 3"; var pattern = /d+/g;