Reuse Patterns Using Capture Groups Not passing '42 42 42 42'

Tell us what’s happening:

It says it should not capture ‘42 42 42 42’
when I run it on regexr It indeed does not capture that so it seems to be valid. What is wrong with this solution?

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.119 Safari/537.36.

Link to the challenge:

your regex match 3 consecutive numbers, "42 42 42 42" contains 3 consecutive numbers, you need to add something more to your regex so that it matches exactly three numbers

yes my regex matches three consecutiove numbers with a space in between, at least this is how I understood the challenge. Do you mean to say the challenge wants me to test for the " " as well ?
if you copy and paste
42 42 42 42
into you will see its not matching as the challenge is requesting. I still dont understand why its not passing this final test

It is matching part of the string, as such it still returns true, you need to find a may to not match that string at all

Like if you have a regex /a/ it will test true for both "a" and "piano"


consider the previous challenges in which you were matching the beginning or the ending of a string