in reply to Regular expression
Depending the context of parsing the log, you might find it easier to use AWK!! Woohoo!
Something like:
{ print $2"|"$3"|"$7 }
You would run something like this
awk '{print $2"|"$3"|"$7}' web.log | perl parselog.pl
Then your perl would be something like this
while (<>) { chomp; my ($time, $date, $expo) = split /\|/; print "$time, $date, $expo\n"; }
I have recently starting using AWK to parse through delimited files. It's nice. Sorry about suggesting a non-perl solution. :-) I think it might be *NIX only too, but I am not sure.
|
|---|