Tell us what’s happening:
/* 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.
Your regex should not match any characters in "He made a fair move. Screaming about it can't help you."
*/
let chewieQuote = “Aaaaaaaaaaaaaaaarrrgh!”;
let chewieRegex = /a*|^a+/i; // Change this line
let result = chewieQuote.match(chewieRegex);
How to do it,please?
Your code so far
let chewieQuote = "Aaaaaaaaaaaaaaaarrrgh!";
let chewieRegex = /a*/i; // Change this line
let result = chewieQuote.match(chewieRegex);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 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