Regular Expressions - Check For Mixed Grouping of Characters

Tell us what’s happening:

how can i get this code write
it only lacks one condition for frank roosevelt
and according to how i see i have done everything right
still i don’t know what i am doing wrong

Your code so far

let myString = "Eleanor Roosevelt";
let myRegex = /[Frank(lin?\s)(\sD.\s)?|Eleanor]\sRoosevelt/; // Change this line
let result = myRegex.test(myString)
 // Change this line
// After passing the challenge experiment with myString and see how the grouping works

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:128.0) Gecko/20100101 Firefox/128.0

Challenge Information:

Regular Expressions - Check For Mixed Grouping of Characters

hi and welcome to the forum!

This regex looks like it will match:
F Roosevelt
r Roosevelt
a Roosevelt
n Roosevelt
k Roosevelt

and many more

But that’s not what the step wants.

Try to start with the original code again, and add exactly what you need, step by step.
For eg. How would you match exactly Franklin Roosevelt?

Here’s a tool to help you test your regex:

(make sure you choose ECMAScript in the right-hand-side “Flavor” menu)