Bug 6076 – std.regex: "c.*|d" matches "mm"

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Mac OS X
Creation time
2011-05-29T10:43:00Z
Last change time
2011-06-06T08:35:41Z
Keywords
wrong-code
Assigned to
nobody
Creator
kennytm

Comments

Comment #0 by kennytm — 2011-05-29T10:43:18Z
Test case: ------------------------------ import std.regex; void main() { auto re = regex("c.*|d"); auto m = match("mm", re); assert(m.empty); // asserts } ------------------------------ The regex does not match as expected on 2.042, but it matches an empty string on 2.053.
Comment #1 by kennytm — 2011-05-29T11:12:15Z
The bug was introduced in commit 535875fa56a26740a05f (https://github.com/D-Programming-Language/phobos/commit/535875fa56a26740a05f).
Comment #2 by dmitry.olsh — 2011-06-06T08:35:41Z