Use capture groups in reRegex to match numbers that are repeated only three times in a string, each separated by a space.

But your pattern doesn’t work! So let me give some hint.

You need to get help of groups, as you did like (\d)
Note \w could math the chars like ‘A’ too, so you need another pattern to just grab the digits. + means 1 or more, not sure why did you added 1 after it! it’s not required. \s\1 looks okay, but refer to the challenge again, it says 3 times! while it’s 2 times for you.

Feel free to ask for more hint comrade, but I believe you can make it now.

First \w might pass this test, but challenge asked for digits, so this is better to use \d

I’m sorry, I think I confused you, this \2 is wrong, becasue\2 mean point second group where there is no any second group.

Let me give more hint, considering following code which fixed of your patter, but still incompleted.

let reRegex = /(\d+)\s\1/;

This mean anything regex captures(match) for first group, it should be next to it with a space, let’s look at it in more detail (\d+) mean one or many digits together(like 1,90,2233,81801), and let’s name it group 1(becasue it’s the first group) \s mean an space \1 means exactly first group. So it mean if the first group was 9087, now we expect 9087 again(same content)
Possible matches: 77 77 , 10 10
possible not matching: 90 91 , 23 22 , 09 9

So it’s almost done pal, but the challenge wants you, first group is repeated three times, while the above matches are two repeats.

12 42 42 42 123 won’t match the /^(\d+)\s\1\s\1$/, since the pattern expect one digit starts from the beginning(please mind the ^) should be repeated three times and no more (please mind the $).

detailed process, assuming matching 12 42 42 42 123 with /^(\d+)\s\1\s\1$/ ^(\d+) means a digit just at start of the line, so it’s 12 and matches \s means space which matches \1 means exactly first group, but it’s 42, so it fails, and pattern return false, no more check for next data

then you may ignore ^ and $, so it lets the regex to match any string comes with same 3 consecutive digits