\w might pass this test, but challenge asked for digits, so this is better to use
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)
77 77 ,
possible not matching:
90 91 ,
23 22 ,
So it’s almost done pal, but the challenge wants you, first group is repeated three times, while the above matches are two repeats.
Now make it real.