www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13306] New: ctRegex compilation fails if an alternative


          Issue ID: 13306
           Summary: ctRegex compilation fails if an alternative pattern is
                    specified inside a group
           Product: D
           Version: D2
          Hardware: x86
                OS: Windows
            Status: NEW
          Severity: normal
          Priority: P1
         Component: Phobos
          Assignee: nobody puremagic.com
          Reporter: maxpat78 yahoo.it

This little sample code can't get compiled if the ctRegex! version is used (DMD

import std.stdio;
import std.regex;

void main() {
    auto s0 =
    auto s1 =

    //~ C:\Bin\DMD2\windows\bin\..\..\src\phobos\std\regex.d-mixin-5885(6214):
Error: found 'else' instead of statement
    //~ auto rx =

    // This works fine as expected, instead...
    auto rx =

    writeln(match(s0, rx).empty());
    writeln(match(s1, rx).empty());

Aug 16 2014