Is str ~ regex the root of all evil, or the leaf of all good?

jovo jovo at at.home
Thu Feb 19 11:59:01 PST 2009


"Andrei Alexandrescu" <SeeWebsiteForEmail at erdani.org> wrote in message 
news:gnkc24$hul$1 at digitalmars.com...
>
> The consecrated terminology is:
>
> foreach(match; match(s, r))
>    foreach(capture; match)
>      writeln(capture);
>
> "Group" is a group defined without an intent to capture. A "capture" is a 
> group that also binds to the state of the match.
>
> Anyhow... this can be done but things get a tad more confusing for other 
> uses. How about this:
>
> foreach(match; match(s, r))
>    foreach(capture; match.captures)
>      writeln(capture);
>
> ?
>
>
> Andrei


I think you must answer this question more generally, same for all library.
May be both?






More information about the Digitalmars-d mailing list