Tell us what’s happening:
Describe your issue in detail here.
Hello freeCodeCampers !
I’m doing this exercise but what make me wonder is the example of the exercise on this line let oPhrase = "over the moon";
it shows null even when i make it search for global matches g
, Any assistance would be very appreciated.
Your code so far
// // Only change code below this line
// let chewieRegex = /change/; // Change this line
// // Only change code above this line
// let result = chewieQuote.match(chewieRegex);
let soccerWord = "gooooooooal!";
let gPhrase = "gut feeling";
let oPhrase = "over the moon";
let goRegex = /go*/gi;
console.log(soccerWord.match(goRegex))
console.log(gPhrase.match(goRegex))
console.log(oPhrase.match(goRegex))
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.102 Safari/537.36 Edg/104.0.1293.63
Challenge: Regular Expressions - Match Characters that Occur Zero or More Times
Link to the challenge: