FReD ( Fast Regular expressions for D) is a GSOC project proposed as
source level compatible replacement for std.regex. Needless to say it is
also superior in many ways ;)
Source + docs + goodies packaged here:
https://github.com/downloads/blackwhale/FReD/FReD.zip
Goodies include popular regex-dna benchmark, by my measures we should be
at least #3 among single threaded solutions. Though I used 64bit VM
linux box, on win32 sadly it runs out of memory on the same machine
(false pointers?).
Speaking of source there are few artifacts that should end up in std.uni
and not in std.regex:
CodepointSet and CodepointTrie, and unicode property tables.
I'd rather have them all accessible to user, but their interface is
admittedly clunky, I'm open to ideas on better API.
Notable caveats:
- backreferences allowed only to locally unique groups, e.g.
\b(\w+)\b\1 is allowed, same w/o any of \b - not.
- replace with delegeate now takes Captures!R where R is e.g. string.
This is due to having few types of engine and RegexMatch!X respectively.
Previous signature allowed a certain measure of abuse e.g. you could
have done a couple of popFronts on it matcher(!) in this delegate.
However in most cases the code inside can be left as is.
Otherwise it should work with existing code after replacing imports.
P.S. I'm taking a seat somewhere in review queue, and busying myself
with newspaper :)
--
Dmitry Olshansky