How can I solve it Match Characters that Occur Zero or More Times

Tell us what’s happening:

Your code so far


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

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 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

So the a* is fine (zero or more a characters). But the challenge wants you to match the uppercase as well, so you want a capital A followed by zero or more lowercase a characters.

2 Likes

This challenge is highly confusing.