As of DMD/Phobos v2.111.0, the following program throws an ArraySliceError when run:
import std.regex;
void main()
{
auto re = regex(r"(a)?\1");
auto _ = "xaa".matchFirst(re);
}
The error is:
core.exception.ArraySliceError@/usr/include/dmd/phobos/std/regex/internal/ir.d(846): slice [18446744073709551615 .. 0] has a larger lower index than upper index
The starting index, 18446744073709551615, is equal to cast(ulong) -1.