On Tuesday, 7 August 2012 at 20:51:28 UTC, Dmitry Olshansky wrote:
Great! I never tried ;) Should just work though...
hehe :)
That all being said experimental tag on ctRegex in DDoc is here
for a reason, and that is: ctRegex can't compile nor match full
regex testsuite.
Understood, thanks for your quick response nevertheless. :)
There are different errors depending on which of the two captures
is attempted to be accessed.
auto m = match("a = 42;",
ctRegex!(`(?P<var>\S+)\s*=\s*(?P<value>\d+);`));
auto c = m.captures;
// c["var"]; =>
core.exception.RangeError@std.regex(2145): Range violation
// c["value"]; =>
Object.Exception@C:\D\dmd2\windows\bin\..\..\src\phobos\std\regex.d(2145):
no su
bmatch named value