Which of the following will match the below regular expression?

String regex = "[A-Z][a-z0-9@$%&]{0,}([ ][A-Za-z]{1,})*";

"A@ "

"alex1"

"Alex2&"

"John snow"

Verified Answer
Correct Option - cd

To get all Self Assessment - Programming using Java Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram