in reply to Pluggable regex engine in Perl

I have read that the TCL regex engine is a mixture of DFA and NFA: DFA is used when possible, NFA otherwise. Any comments on the truth of this notion, how appropriate this approach is, its performance vis-a-vis Perl's standard regex engine, and whether it might be available as a plug-in?

Replies are listed 'Best First'.
Re^2: Pluggable regex engine in Perl
by tilly (Archbishop) on Dec 28, 2010 at 06:57 UTC
    From what I've read (which is dated by many years) TCL uses a DFA engine to test whether a match exists, then if it does and capturing substrings are needed, it uses an NFA engine to capture them.

    But this is a pretty good explanation of an alternate way that a regular expression engine could work and blend the advantages of a DFA and NFA engine.