http://d.puremagic.com/issues/show_bug.cgi?id=5674


Magnus Lie Hetland <mag...@hetland.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mag...@hetland.org


--- Comment #1 from Magnus Lie Hetland <mag...@hetland.org> 2011-03-31 07:09:07 
PDT ---
I have similar problems with stuff like this:

import std.stdio, std.regex;
void main() {
    foreach (m; match("abc", "a|(x)")) {
        foreach (e; m.captures) {
            writeln(e);
        }
    }
}

Here it prints out "a" and then I get a range violation. Whether or not
m.captures[1] exists, iterating over m.captures should be possible?

Also: Checking whether m.captures[1] exists would be highly useful -- to see
what has matched. (Doing this by length wouldn't work in general, of course.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to