Tell us what’s happening:
Problem statement: Create a regex chewieRegex that uses the * character to match all the upper and lower"a" characters in chewieQuote. Your regex does not need flags, and it should not match any of the other quotes.
My code doesn’t work as it would fail in matching these two sentences -
- “He made a fair move. Screaming about it can’t help you.”
- “Let him have it. It’s not wise to upset a Wookiee.”
Your code so far
let chewieQuote = "Aaaaaaaaaaaaaaaarrrgh!"; let chewieRegex = /a*/gi; // I wrote this code, but seems incorrect. let result = chewieQuote.match(chewieRegex); console.log(result);
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.