Why the extra characters? the example makes it seem like (Franklin|Eleanor) Roosevelt would work just fine

Tell us what’s happening:

why would i put the asterisk and the wild card in there? Nothing in the example exemplifies this.

Your code so far


let myString = "Eleanor Roosevelt";
let myRegex = /(Franklin|Eleanor).*Roosevelt/gi; // Change this line
let result = false; // 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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36.

Challenge: Check For Mixed Grouping of Characters

Link to the challenge:

because you need to allow also eventual initial of second name, like Franklin D. Roosevelt

1 Like

yeah I get that its making concessions for middle names but I wish they would teach this language first then challenge you. I don’t see where in the lesson I’d have gotten that .* would make concessions for middle text. but thanks omg youre so smart.

because . means any character and * zero or more, and they have already been introduced - eventually you need to start putting together the tools you have been presented with on your own