in reply to Re^2: fast greedy regex
in thread fast greedy regex

I was going to suggest substr() (which is around twice as fast as any of these to extract just these three pieces of data, perfectly formatted) - until I saw the real regex being used. I can't imagine substr, unpack or any rigidly formatted extraction method is any use at all for that lot.

Replies are listed 'Best First'.
Re^4: fast greedy regex
by BrowserUk (Patriarch) on Jun 08, 2004 at 09:38 UTC

    The thing that really queers the pitch is the quoted field 2/3rds of the way down each line. Without that, you could use the magic form of split and it would (probably) be quicker. As it is, I can't see any way of improving the performance over the long, but actually quite fast regex.


    Examine what is said, not who speaks.
    "Efficiency is intelligent laziness." -David Dunham
    "Think for yourself!" - Abigail