[Issue 5674] New: AssertError in std.regex

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Mar 1 08:17:33 PST 2011


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

           Summary: AssertError in std.regex
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Mac OS X
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: doob at me.com


--- Comment #0 from Jacob Carlborg <doob at me.com> 2011-03-01 08:14:43 PST ---
The following code results in an AssertError or RangeError (don't know if the
RangeError is expected behavior) :

import std.regex;
import std.stdio;

void main ()
{
    auto m = "abc".match(`a(\w)b`);

    writeln(m.hit); // AssertError in regex.d:1795
    writeln(m.captures); // RangeError in regex.d:1719
}

Can't "hit" just return an empty string and "captures" an empty range?

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


More information about the Digitalmars-d-bugs mailing list