www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18499] New: std.regex cannot handle (?i:)

https://issues.dlang.org/show_bug.cgi?id=18499

          Issue ID: 18499
           Summary: std.regex cannot handle (?i:)
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: doob me.com

Compiling and running the following code:

import std.regex;

void main()
{
    regex(`(?i:)`);
}

Gives the following runtime exception:

phobos/std/regex/internal/parser.d(1018):  's', 'x', 'i', 'm' or '-' expected
after '(?'
Pattern with error: `(?i:` <--HERE-- `)`
Pattern with error: `(?i:` <--HERE-- `)`

Is this a bug or does std.regex not support this syntax?

--
Feb 22 2018