Regular Expressions - Check For Mixed Grouping of Characters

Tell us what’s happening:
These can also be used as solutions for this problem
/(Franklin( [a-zA-Z].| )?|Eleanor) Roosevelt/
or
/(Franklin( [a-zA-Z].| )*|Eleanor) Roosevelt/
Please correct me if I am wrong by explaining. I will be happy to clear my concepts.

Your code so far

let myString = "Eleanor Roosevelt";
let myRegex = /(Franklin( [a-zA-Z].| )*|Eleanor) 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/115.0.0.0 Safari/537.36 Edg/115.0.1901.188

Challenge: Regular Expressions - Check For Mixed Grouping of Characters

Link to the challenge:

  • do you get any errors with them? if not then its good
  • there are many ways a problem can be solved, so good job :slight_smile:

happy coding :slight_smile:

1 Like

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