www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 5805] New: std.regex match captures property horribly broken

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5805

           Summary: std.regex match captures property horribly broken
           Product: D
           Version: D2
          Platform: x86
        OS/Version: All
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: dmitry.olsh gmail.com



05:57:13 PDT ---
void main(){
    auto r = regex(`(a)(b)?(c*)`);
    writeln(r.captures);
    auto m = "acc".match(r);
    writeln(m.hit); 
    foreach(c;m.captures)
        writeln(c);
}

Output:
3
acc
acc
a
core.exception.RangeError std.regex(1719): Range violation

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Apr 01 2011
parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=5805


Dmitry Olshansky <dmitry.olsh gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE



15:13:00 PDT ---
*** This issue has been marked as a duplicate of issue 5511 ***

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