in reply to Re^2: Break up weblogs
in thread Break up weblogs

the system's grep command, which you are almost assured will run slower than Perl's regex engine.

I'm going to have to put on my Pants of Dubious Benchmarking here and suggest that grep can beat Perl regexes, even in cases like this where Perl might use Boyers-Moore.

Replies are listed 'Best First'.
Re^4: Break up weblogs
by Aristotle (Chancellor) on Aug 11, 2004 at 20:26 UTC

    And I'm just going to add that grep uses a DFA engine, while Perl's regex engine is an NFA. DFAs don't backtrack. It's likely that grep will win most matches (pun intended) with nontrivial patterns. (The drawback, of course, is that a DFA does not natively support many of the advanced matching features NFAs can offer, such as backreferences.)

    Makeshifts last the longest.