Tell us what’s happening:
My code passed for 3 first tests, but failed for 2 last tests.
I have check it on a tool called RegExr then I see that my code didn’t match any character in the 2 below string (2 last tests).
Is any solution for this?
-
Passed:Your regex
chewieRegex
should use the*
character to match zero or morea
characters. -
Passed:Your regex should match the string
A
inchewieQuote
. -
Passed:Your regex should match the string
Aaaaaaaaaaaaaaaa
inchewieQuote
. -
Passed:Your regex
chewieRegex
should match 16 characters inchewieQuote
. -
Failed:Your regex should not match any characters in the string
He made a fair move. Screaming about it can't help you.
-
Failed:Your regex should not match any characters in the string
Let him have it. It's not wise to upset a Wookiee.
Your code so far
// Only change code below this line
let chewieRegex = /a*(?=[ar])/gi; // Change this line
// Only change code above this line
let result = chewieQuote.match(chewieRegex);
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/112.0.0.0 Safari/537.36
Challenge: Regular Expressions - Match Characters that Occur Zero or More Times
Link to the challenge: