Small bug in article on digitalmars.com

KlausO oberhofer at users.sf.net
Tue Sep 19 07:04:03 PDT 2006


There seems to be a small bug in a sample on the regexp article on 
http://www.digitalmars.com/d/regular-expression.html:

if (m; std.regexp.search("abcdef", "c"))
     writefln("%s[%s]%s", m.pre, m.match(0), m.post); // writes ab[c]def

should possibly be

if (auto m = std.regexp.search("abcdef", "c"))
     writefln("%s[%s]%s", m.pre, m.match(0), m.post); // writes ab[c]def



More information about the Digitalmars-d-bugs mailing list