Match Characters that Occur Zero or More Times - some tests failing

Match Characters that Occur Zero or More Times - some tests failing
0

#1

Tell us what’s happening:

Your code so far


let chewieQuote = "Aaaaaaaaaaaaaaaarrrgh!";
let chewieRegex = /a*/gi; // 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/69.0.3497.100 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

I wrote that regex for the problem but some of the tests are still failing. What am I doing wrong?


#2

https://regexr.com
This is a really cool tool for testing regular expressions. You’ll need to copy the test cases into the textbox to see how your regular expression matches them