Tell us what’s happening:
-
Passed:Your regex
myRegexshould returntruefor the stringFranklin D. Roosevelt -
Failed:Your regex
myRegexshould returntruefor the stringEleanor Roosevelt -
Passed:Your regex
myRegexshould returnfalsefor the stringFranklin Rosevelt -
Passed:Your regex
myRegexshould returnfalsefor the stringFrank Roosevelt -
Passed:Your regex
myRegexshould returnfalsefor the stringFranklinRoosevelt -
Passed:Your regex
myRegexshould returnfalsefor the stringEleanorRoosevelt -
Passed:You should use
.test()to test the regex. -
Failed:Your result should return
true.
Why am i failing these two points i dont get it
Your code so far
let myString = "Eleanor Roosevelt";
let myRegex = /(Eleanor|Franklin) (.*) 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
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/118.0.0.0 Safari/537.36
Challenge Information:
Regular Expressions - Check For Mixed Grouping of Characters