Mostly I want to capture several subgroups. I'm not a repeat group capture and capture a repeating group
If there is aaa , I want to get the following subgroups:
$ 1: a $ 2: a $ 3: a
This can be achieved using (a) (a) (a) .
Now I'm trying to do it as something like strings (a) {3} , unfortunately, only leads to $ 1: a
EDIT: I am trying to do this in Java. I already have another solution that uses StringBuilder to generate the correct template, repeating the capture group for the number of expected events.
This question was more out of curiosity and because I was looking for an easier way to do this.
What Some1.Kill.The.DJ mentioned is what I tried to do in Java.
source
share