Tell us what’s happening:
Describe your issue in detail here.
when I added ^ to the beginning of my code, just like in the solution, it worked. Before I put the ^ the only one failing with this code was "should not match 42 42 42 42 and I don’t understand why not putting ^ would make 42 42 42 42 match.
Your code so far
let repeatNum = "42 42 42";
let reRegex = /(\d+)(\s)\1\2\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/92.0.4515.107 Safari/537.36
Challenge: Reuse Patterns Using Capture Groups
Link to the challenge: