What's wrong :Match Characters that Occur Zero or More Times

What's wrong :Match Characters that Occur Zero or More Times
0

#1

Tell us what’s happening:

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 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


#2

Your regex should not match any characters in “He made a fair move. Screaming about it can&#39t help you.”

Your pattern match any char ( match a 0 or more times, so it matches everything^^)


#3

i still didn’t get you?


#4

/a*/ match when a character occurs 0 or more times
It means that on the string string it matches 7 times;

  • ``: it matches (a char occur 0 times);
  • s: it matches (a char occur 0 times);
  • st: it matches ( a char occur 0 times);
  • str: it matches (a char occur 0 times);
  • stri: it matches (a char occur 0 times);
  • strin: it matches (a char occur 0 times);
  • string: it matches (a char occur 0 times);

You are asked ( the last two conditions ) to not match any character in the statement they provide