Check For Mixed Grouping of Characters

Hello,

My code:

let myString = "Eleanor Roosevelt";
let myRegex = /(Franklin|Eleanor).*\sRoosevelt/; // Change this line
console.log(myRegex.test(myString)); // Change this line
// After passing the challenge experiment with myString and see how the grouping works

Just hit a wall and trying to pass the test - “Your result should return TRUE” (screenshot below). Can someone please provide feedback on what I’m missing and/or why the last test is failing?

You deleted part of the original last line.

1 Like

Lol dammit :man_facepalming: thank you. Had to reset the exercise, then update the original last line for this code to pass:

let myString = "Eleanor Roosevelt";
let myRegex = /(Franklin|Eleanor).*\sRoosevelt/; // Change this line
console.log(myRegex.test(myString));
let result = true; // Change this line
// After passing the challenge experiment with myString and see how the grouping works

THANKS AGAIN!

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