[Issue 8529] New: ctRegex - named submatch - hash-table exception
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 9 09:40:48 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8529
Summary: ctRegex - named submatch - hash-table exception
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Phobos
AssignedTo: nobody at puremagic.com
ReportedBy: wyrlon at gmx.net
--- Comment #0 from Daniel <wyrlon at gmx.net> 2012-08-09 09:40:46 PDT ---
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"]; =>
core.exception.RangeError at std.regex(2145): Range violation
// c["value"]; =>
Object.Exception at C:\D\dmd2\windows\bin\..\..\src\phobos\std\regex.d(2145):
no submatch named value
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list