Hello all,
How is it that the space between the first and last name – and optional middle name – in this challenge is accounted for without using the \s
element in the regex?
This is from the lesson Regular Expressions: Check For Mixed Grouping of Characters.
let myString = "Eleanor Roosevelt";
let myRegex = /(Franklin|Eleanor).*Roosevelt/;
let result = myRegex.test(myString);