www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12366] New: Range violation in compile-time regex

https://d.puremagic.com/issues/show_bug.cgi?id=12366

           Summary: Range violation in compile-time regex
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: thecybershadow gmail.com
                CC: dmitry.olsh gmail.com



02:03:30 EET ---
import std.regex;

void main()
{
    auto re = ctRegex!(`^((?=(xx+?)\2+$)((?=\2+$)(?=(x+)(\4+$))\5){2})*x?$`);
    "xxxxxxxx".match(re);
}

This program crashes at runtime:
core.exception.RangeError std.regex(3108): Range violation

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