Bug 14159 – Bug in ctRegex - "Error: found 'else' instead of statement"

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Other
Creation time
2015-02-09T20:34:00Z
Last change time
2015-02-11T21:08:42Z
Assigned to
nobody
Creator
Dbugs

Comments

Comment #0 by Dbugs — 2015-02-09T20:34:39Z
The following regular expression string (valid as it works in non-compile time regex) causes the "Error: found 'else' instead of statement" compile time message: "/usr/include/dmd/phobos/std/regex.d-mixin-5885(5943): Error: found 'else' instead of statement" --- import std.regex; auto commentRx = ctRegex!(`.*?(//.*[\r\n]|/\*(?:.|[\r\n])*?\*/)`, "gm"); void main() {} --- This is as observed on hackerrank.com which used D Version 2.066. See https://www.hackerrank.com/environment
Comment #1 by electrolysis.jp+d — 2015-02-10T15:09:37Z
*** This issue has been marked as a duplicate of issue 12105 ***
Comment #2 by Dbugs — 2015-02-11T21:08:42Z
(In reply to e10s from comment #1) > > *** This issue has been marked as a duplicate of issue 12105 *** Thanks!