in reply to Efficient Way to Parse a Large Log File with a Large Regex

The log file is large, it sometimes gets up to 3GB

A large file seeking technique is described here and it works very well.. the discussion was about replacing characters with  tr, you can adapt it to your IP matching needs easily I think. HTH