"Andrei Alexandrescu" <[email protected]> wrote in message 
news:[email protected]...
>
> Looks simple but it isn't. How do you advance to the next match?
>
> foreach (m; "abracadabra".match("(.)a", "g")) writeln(m.capture[0]);
>
> This should print:
>
> r
> c
> d
> r
>
> There's need to make progress in the matching, not in the capture. How do 
> you distinguish among them?
>
>
> Andrei

foreach(capture; match(s, r))
  foreach(group; capture)
    writeln(group);



Reply via email to