www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Small bug in article on digitalmars.com

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
Sep 19 2006