http://d.puremagic.com/issues/show_bug.cgi?id=8529
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #1 from [email protected] 2013-02-25 07:22:34 PST --- (In reply to comment #0) > Reported on v2.060 (but no version seems to work). > > The code is based on the opIndex example from: > http://dlang.org/phobos/std_regex.html#regex > > The normal regex version is functional, but when converting to ctRegex, the > hashtable lookup throws.( > > auto m = match("a = 42;", > ctRegex!(`(?P<var>\S+)\s*=\s*(?P<value>\d+);`)); > auto c = m.captures; > > // c["var"]; => > [email protected](2145): Range violation > > // c["value"]; => > Object.Exception@C:\D\dmd2\windows\bin\..\..\src\phobos\std\regex.d(2145): > no submatch named value Just spent an hour duplicating this one. Bump. Since ctRegex is an "Experimental feature.", it may be worth documenting the existence of this bug in http://dlang.org/phobos/std_regex.html#.StaticRegex. If we don't know how to fix this, it may also be worth temporarily and statically turning down named captures in static regexes, with a "sorry" message. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
