Reuse Patterns Using Capture Groups

Reuse Patterns Using Capture Groups
0.0 0


Tell us what’s happening:
I double check my code by regex tester, it should be fine.

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:



In case anyone else arrives here, following link has the answer.