http://d.puremagic.com/issues/show_bug.cgi?id=3414
Summary: std.file.listdir: Use regex, not RegExp Product: D Version: 2.035 Platform: Other OS/Version: Windows Status: NEW Keywords: patch Severity: normal Priority: P2 Component: Phobos AssignedTo: nob...@puremagic.com ReportedBy: dsim...@yahoo.com --- Comment #0 from David Simcha <dsim...@yahoo.com> 2009-10-17 14:42:45 PDT --- std.file.listdir still uses the old-school std.regexp lib, even though this will likely be deprecated soon. Here's a version using the new-school std.regex. string[] listdir(Char)(in char[] pathname, Regex!(Char) r) { Appender!(string[]) result; bool callback(DirEntry* de) { if (de.isdir) listdir(de.name, &callback); else { if (!match(de.name, r).empty) result.put(de.name); } return true; // continue } listdir(pathname, &callback); return result.data; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------