Reuse Patterns Using Capture Groups 100{3}

Reuse Patterns Using Capture Groups 100{3}
0

#1

Tell us what’s happening:

Test says it doesn’t match “100 100 100” when the console log says it does. Is the test case wrong?

Your code so far


let repeatNum = "100 100 100";
let reRegex = /^(\d*)\s\1\s\1$/g; // Change this line
let result = repeatNum.match(reRegex);
console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/reuse-patterns-using-capture-groups