Match Characters that Occur Zero or More Times 2

Tell us what’s happening:

Your code so far


let chewieQuote = "Aaaaaaaaaaaaaaaarrrgh!";
let chewieRegex = /a-r*/i; // Change this line
let result = chewieQuote.match(chewieRegex);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/match-characters-that-occur-zero-or-more-times

/a-r/ will search for just that, “a-r”. Here’s an example:

let chewieQuote = "Aaaaaaaaaaaaaaa-rrrgh!";
let chewieRegex = /a-r*/i; 
let result = chewieQuote.match(chewieRegex);
console.log(result); //returns "a-rrr"

You’re only looking to return the a’s in this one. The instructions mention you don’t need flags, which is a hint about what needs to be inside the slashes instead…