Reuse Patterns Using Capture Groups

Reuse Patterns Using Capture Groups
0.0 0

#1

Tell us what’s happening:
I double check my code by regex tester, it should be fine.
https://regex101.com/r/FS9KSe/1

Your code so far


let repeatNum = "42 42 42";
let reRegex = /(\d+)\s\1\s\1/; // Change this line
let result = reRegex.test(repeatNum);

Your browser information:

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

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


#2

#3

In case anyone else arrives here, following link has the answer.
Reuse-patterns-using-capture-groups