Regular expression reuse pattern using capture groups

stuck on this.what are my not getting right on this challenge??

Your code so far


let repeatNum = "42 42 42";
let reRegex = /^(\d+) \s \1 \1 $/; // Change this line
let result = reRegex.test(repeatNum);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:96.0) Gecko/20100101 Firefox/96.0

Challenge: Reuse Patterns Using Capture Groups

Link to the challenge:

if you want match that patter you can use this

let reRegex = /^\d{2}\s?\d{2}\s\d{2}$/;

thanks.i figured it out

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.