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

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:

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

i still didn’t get you?

/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

I faced the same problem, but look carefully what the “chewieQuote” is!
Try writing to match this. it is simple though but like a quirk

1 Like

I am trying to understand what you said but I still do not get a clue! Can you atleast give more explanations on this?

/a*/i this match a 0 or more times, if you want for it to match something specific you need to add some other things to match around it

1 Like

Now that is the thing that is confusing me, I kinda fail to understand what is that thing that am suppose to add! Can you at least direct me to a lesson or challenge that can help me figure that out?

Now I get it:
The secret is in the “chewieQuote” , its a bit quirky but doable.

1 Like

thanks, very helpful

1 Like

This challenge is so unclear on what are we even supposed to do with it. I am not struggling with regex, but with the challenge behind it.