<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/4.2.2">
</HEAD>
<BODY>
<BR>
import std.regex;<BR>
void main() {<BR>
    auto r = ctRegex!(r"/a/b/(c|d|e|f)", "g");<BR>
}<BR>
<BR>
This simple app fails at compile time.<BR>
<BR>
Online compiler says:<BR>
<BR>
/usr/local/include/dmd2/std/regex.d(1150): Error: assert(this.ir[cast(ulong)orStart].code() == cast(IR)129u) failed<BR>
/usr/local/include/dmd2/std/regex.d(876):        called from here: this.parseRegex()<BR>
/usr/local/include/dmd2/std/regex.d(6428):        called from here: parser.this(pattern,flags)<BR>
/usr/local/include/dmd2/std/regex.d(6412):        called from here: regexImpl(pattern,flags)<BR>
/usr/local/include/dmd2/std/regex.d(6437):        called from here: regex("/a/b/(c|d|e|f)","g")<BR>
/usr/local/include/dmd2/std/regex.d(1150): Error: assert(this.ir[cast(ulong)orStart].code() == cast(IR)129u) failed<BR>
/usr/local/include/dmd2/std/regex.d(876):        called from here: this.parseRegex()<BR>
/usr/local/include/dmd2/std/regex.d(6428):        called from here: parser.this(pattern,flags)<BR>
/usr/local/include/dmd2/std/regex.d(6412):        called from here: regexImpl(pattern,flags)<BR>
/usr/local/include/dmd2/std/regex.d(6439):        called from here: regex("/a/b/(c|d|e|f)","g")<BR>
/usr/local/include/dmd2/std/regex.d(6439):        called from here: ctGenRegExCode(regex("/a/b/(c|d|e|f)","g"))<BR>
/usr/local/include/dmd2/std/regex.d(1150): Error: assert(this.ir[cast(ulong)orStart].code() == cast(IR)129u) failed<BR>
/usr/local/include/dmd2/std/regex.d(876):        called from here: this.parseRegex()<BR>
/usr/local/include/dmd2/std/regex.d(6428):        called from here: parser.this(pattern,flags)<BR>
/usr/local/include/dmd2/std/regex.d(6412):        called from here: regexImpl(pattern,flags)<BR>
/usr/local/include/dmd2/std/regex.d(6446):        called from here: regex("/a/b/(c|d|e|f)","g")<BR>
/usr/local/include/dmd2/std/regex.d(6446):        called from here: StaticRegex(null,Regex(null,null,null,0u,0u,0u,0u,0u,null,null,ShiftOr(null,0u,0u))).this(regex("/a/b/(c|d|e|f)","g"),& func)<BR>
/usr/local/include/dmd2/std/regex.d(6463): Error: template instance std.regex.ctRegexImpl!("/a/b/(c|d|e|f)","g") error instantiating<BR>
822.d(5):        instantiated from here: ctRegex!("/a/b/(c|d|e|f)","g")<BR>
822.d(5): Error: template instance std.regex.ctRegex!("/a/b/(c|d|e|f)","g") error instantiating<BR>
<BR>
<BR>
<BR>
Il giorno mar, 07/08/2012 alle 19.53 +0400, Dmitry Olshansky ha scritto:
<BLOCKQUOTE TYPE=CITE>
<PRE>
On 07-Aug-12 16:06, Andrea Fontana wrote:
> dmd 2.060 64bit ubuntu:
>
> // Doesn't work:
> auto r = ctRegex!(r"/api/places/(id|related|search|count)\.(json|xml)",
> "g");
>

Could be. It is experimental and is known to have bugs.
What is the exact problem statement?

> // Works:
> auto r = regex(r"/api/places/(id|related|search|count)\.(json|xml)", "g");
>
>


</PRE>
</BLOCKQUOTE>
<BR>
</BODY>
</HTML>