compile-time regexp lib released
Robert Fraser
fraserofthenight at gmail.com
Tue Aug 7 11:33:01 PDT 2007
Marton Papp Wrote:
> Hi!
> There is an alternative way to match regular expressions.
> Scregexp was released a month ago. (by me)
> The regular expessions are converted into CTFE functions (a backtracking
> top/down recursive descent parser) at compile time.
> This should give faster regular expressions.
> A lot of regular expression constructs are supported.
> (?:),(),\d,\s,\w... Also, various switches such as i (case-insensitive
> search),s, and x partly..
> I consider it to be in beta state.
>
> Regards
>
> Marton Papp
>
>
Nice work!
I've always wanted to see compile-time regexes as string mixins, that way they could set Perl-like variables, i.e. __1 would be the first match, __2 the second, etc. Mind if I throw together a modification of your system to do that?
More information about the Digitalmars-d
mailing list