[dmd-beta] D2 2.058 alpha
Rainer Schuetze
r.sagitario at gmx.de
Wed Feb 8 13:53:37 PST 2012
On 08.02.2012 22:14, Jesse Phillips wrote:
> Ok, it is the new std.regex engine, so it wouldn't be a regression from 2.057.
>
> foreach(w; std.string.split(readText(name)))
> if(!match(w, regex(r"\d")).empty)
> {}
I have not tried, but I guess the trouble comes from rebuilding the
regex engine for every word. Did you try
auto re = regex(r"\d");
foreach(w; std.string.split(readText(name)))
if(!match(w, re).empty)
{}
More information about the dmd-beta
mailing list