Reuse Patterns Using Capture Groups - completely lost

Tell us what’s happening:

I read the capture group explanations a few times but I still don’t understand how does the back slash 1 mean at the end of a capture group. I also tried to run thru a few examples but still unable to figure out what it is trying to do. Is there a better explanation I can find elsewhere? Solving this lesson is less of a concern, understanding the concept is more important.

Your code so far


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

console.log(repeatNum.match(reRegex));


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:64.0) Gecko/20100101 Firefox/64.0.

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

So, to match one or more numbers you use (\d+), the parenthesis identify the capture group, if you use the way to call a capture group the expression will match the same thing that the capture group matched, the first capture group is called with \1. we need a space in the middle, so it will be /(\d+)\s\1/, we need three identical numbers so we just have to add an other space and an other \1.
A last thing to do is to match exactly 3 times… can you do that?