I’m struggling to understand this concept and googling for examples of capture groups just leads to finding complicated expressions making it harder.
Can anyone just give some very basic examples of using capture groups including the \number stuff?
My limited understanding with the code writen:
(\d+)\s look for (at least one) numbers until you find a white space
Again, repeat (\d+)\s as requested by challenge
Then repeat three times is denoted by \3
I think the wording of the question is confusing me.
Your code so far
let repeatNum = "42 42 42"; let reRegex = /(\d+)\s(\d+)\s\3/;
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36.