Possible bug for "Regular Expressions: Check For Mixed Grouping of Characters"

A couple issues:

  1. It asks for Franklin Roosevelt but then after running it changes the request to Franklin D. Roosevelt.

  2. When adding the D. or without it the test does not pass the last condition. Even using the suggested hint answer (which I had already tried) does not work.


Your code so far

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

Challenge: Check For Mixed Grouping of Characters

Link to the challenge:

Fix the regex so that it checks for the names of Franklin Roosevelt or Eleanor Roosevelt in a case sensitive manner and it should make concessions for middle names.

it says that it should accept middle names, so not necessarily just the D

you should also accept middle names for Eleanor Roosevelt

for last test, you deleted a variable that was present in the starting code, it is checking the value of that variable

this was my code:
let myRegex = /(Franklin|Eleanor).*Roosevelt/;

you can chose either Franklin or Eleanor at the start (and not Frank) and then one or more character before Roosevelt including the required space and any symbols.