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

           Summary: std.regex : breaks with empy string regex
           Product: D
           Version: D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: bdom.pub+deeb...@gmail.com


--- Comment #0 from Bruno Medeiros <bdom.pub+deeb...@gmail.com> 2010-08-03 
08:13:17 PDT ---
import std.regex; 

void main() {

    foreach(m; match("abcabcabab", regex(""))) {
        writefln("%s[%s]%s", m.pre, m.hit, m.post);
    }

}

----
throws:
core.exception.rangeer...@std.regex(1848): Range violation

The empty string is a perfectly valid regex. (which, IIRC, should match an
input string named src (src.length+1) times)

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

Reply via email to