Use capture groups in
reRegex to match a string that consists of only the same number repeated exactly three times separated by single spaces.
*my code so far*
let repeatNum = "42 42 42";
let reRegex = /(42)\s\1/; // Change this line
let result = reRegex.test(repeatNum);
Do you have a question?
If so, please edit your post to include it in the Tell us what’s happening section.
Learning to describe problems is an important part of learning how to code.
Also, the more information you give us, the more likely we are to be able to help.
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.