in reply to Efficient Way to Parse a Large Log File with a Large Regex
Update: This seems to be faster than hash method.@list = map({ quotemeta "129.$_.125.123" } (0..255)); $regex_text = join('|', @list); $re = qr[($regex_text)]; print $re, "\n"; while (<>) { if ($_ =~ $re) { print "$1\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Efficient Way to Parse a Large Log File with a Large Regex
by Dru (Hermit) on Apr 12, 2005 at 19:30 UTC |