+Dmitry
The old regex had a nice optimization for such cases - it cached the
last engine built.
Dmitry, any idea on how we can approach this?
Andrei
On 2/8/12 1:53 PM, Rainer Schuetze wrote:
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)
{}
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta
_______________________________________________
dmd-beta mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/dmd-beta