in reply to Re: Look Ahead regexp to insert line?
in thread Look Ahead regexp to insert line?

Wouldn't using look ahead regular expressions be more efficient than going through the file letter by letter? That's what I was trying to do with the regexp in my post.

-- Burvil

  • Comment on Re^2: Look Ahead regexp to insert line?

Replies are listed 'Best First'.
Re^3: Look Ahead regexp to insert line?
by choroba (Cardinal) on Oct 02, 2012 at 00:54 UTC
    My script goes through the file line by line, not letter by letter. It should work even for large files where stuffing everything into memory might be a problem.

    If you want to compare different solutions, benchmark. Benchmark can help you.

    لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ