in reply to Pure Ftpd log regex

Hi

It's 2am here so I might get this wrong due to lack of sleep and excessive Lineage2 game play.... This would work for your requirement of the elements separated by spaces. The data you provided in your example doesn't match up to it though

foreach my $my_line (@lines) { my ($month, $day, $time, $user, $ip, $file, $size, $speed) = split +/ /, $my_line; print .... }

No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1

Replies are listed 'Best First'.
Re^2: Pure Ftpd log regex
by davido (Cardinal) on Jul 31, 2004 at 07:11 UTC
    Well, one problem with that is that his filenames (and paths) seem to be able to include spaces too. So simply splitting on whitespace won't do the trick. Also, his date/time has whitespace, but not where you need it.

    Dave

      lol! Yup, this is why I shouldn't post anything after midnight or before noon ;-)

      Jason L. Froebe

      No one has seen what you have seen, and until that happens, we're all going to think that you're nuts. - Jack O'Neil, Stargate SG-1