Bug 5805 – std.regex match captures property horribly broken
Status
RESOLVED
Resolution
DUPLICATE
Severity
critical
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
x86
OS
All
Creation time
2011-04-01T05:57:00Z
Last change time
2011-05-27T15:13:00Z
Assigned to
nobody
Creator
dmitry.olsh
Comments
Comment #0 by dmitry.olsh — 2011-04-01T05:57:13Z
void main(){
auto r = regex(`(a)(b)?(c*)`);
writeln(r.captures);
auto m = "acc".match(r);
writeln(m.hit);
foreach(c;m.captures)
writeln(c);
}
Output:
3
acc
acc
a
[email protected](1719): Range violation
Comment #1 by dmitry.olsh — 2011-05-27T15:13:00Z
*** This issue has been marked as a duplicate of issue 5511 ***