reuse-patterns-using-capture-groups
resolving the free code camp reuse-patterns-using-capture-groups problem
let repeatNum = "42 42 42";
let reRegex = /^(\d+)([" "])\1\2\1$/;
^ starts with (\d+) a digit with at least one char (or else will count spaces) and have a([" "])(space) after the digit and \1 to repeat the...
Submitted by gabriel silva lima - 10 months ago