Regular Expressions - Check For Mixed Grouping of Characters

Tell us what’s happening:
Describe your issue in detail here.
My result output in the console cant bring “true” why?
Your code so far

let myString = "Eleanor Roosevelt";
let myRegex = /(Franklin | Eleanor)(([A-Z]\.?[A-Z][a-z]+))?Roosevelt/; // Change this line
let result = myRegex.test(myString); // Change this line
// After passing the challenge experiment with myString and see how the grouping works
console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36

Challenge: Regular Expressions - Check For Mixed Grouping of Characters

Link to the challenge:

Hey Abooki,

Your myRegex - /(Franklin | Eleanor)(([A-Z]\.?[A-Z][a-z]+))?Roosevelt/ is not written as per the problem statement.

Remove this portion from your answer- (([A-Z]\.?[A-Z][a-z]+))?

Let me know if this doesn’t help,

All the best and welcome back :star2:

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.