On 08-Aug-12 02:05, Daniel wrote:
On Tuesday, 7 August 2012 at 20:51:28 UTC, Dmitry Olshansky wrote:
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

Yikes! Something is wrong with hash-table that maps names to indexes (it's just it).

File this as bug please, including the example.

--
Dmitry Olshansky

Reply via email to