MCQ IN COMPUTER SCIENCE & ENGINEERING

COMPUTER SCIENCE AND ENGINEERING

THEORY OF COMPUTATION

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Generate a regular expression for the following problem statement:Password Validation:String should be 8-15 characters long. String must contain a number, an Uppercase letter and a Lower case letter.
A
^(?=.*[a-z])(?=.*[A-Z])(?=.*)˙.{8, 15}$
B
^(?=.*[a-z])(?=.*[A-Z])(?=.*)˙.{9, 16}$
C
^(?=.[a-z])(?=.[A-Z])(?=.)˙.{8, 15}$
D
None of the mentioned
Explanation: 

Detailed explanation-1: -Building your Strong Password Regular Expression – Examples 1 or more characters consisting of any combination of uppercase, lowercase, digits, and ! #%. Any uppercase or lowercase – as the first character in the string (immediately following the ^ anchor).

Detailed explanation-2: -To check a password between 8 to 15 characters which contain at least one lowercase letter, one uppercase letter, one numeric digit, and one special character. To validate the said format we use the regular expression ^(?=.*)˙(?=.*[a-z])(?=.*[A-Z])(?=.*[^a-zA-Z0-9])(?!.*).8, 15$.

Detailed explanation-3: -Password must contain one digit from 1 to 9, one lowercase letter, one uppercase letter, one underscore, no space and it must be 8-16 characters long. Usage of any other special character other than underscore is optional.

There is 1 question to complete.