The challenge itself seems very confusing. I just can’t figure out how they work. I go to the hint and get one sentence explanations. It seems as if it was poorly written.
I tried /(\d+)\3/ because i’m searching for /(\d+) 3 times. That is how i basically understood this problem.
Can someone completely break down what capture groups are and explain them to me?
The parenthesis () and everything inside it is a capture group
You have defined your first capture group, and you need others equal to it, so you call the capture group with \1 (as that is the first capture group, the number you call t with is 1
So for example two consecutive items is /(\d+) \1/ (space included because you want the spaces inside) (four is /(\d+) \1 \1 \1/)
You will have to figure out how to match exactly three things. It is totally doable with things covered in previous lessons, maybe the logic leap to get that may be difficult to do
Do you mean in that website? The opening and closing slashes are already included. The flags at the end are to be added with the drop down menu on the side. You can find a guide on how to use it, it will be useful to you if you start using regex often, but it is pretty intuitive