Re: Regex for logwatch report

2004-10-05 Thread Kevin Old
On Tue, 05 Oct 2004 22:46:58 -0400, Randy W. Sims <[EMAIL PROTECTED]> wrote: > On 10/5/2004 10:36 PM, Randy W. Sims wrote: > > > while (defined( my $line = )) { > > if ( /-+ pam_unix Begin -+/ .. /-+ pam_unix End -+/ ) { > > # between beginning and end > > } > > } > > err, that w

Re: Regex for logwatch report

2004-10-05 Thread Randy W. Sims
On 10/5/2004 10:36 PM, Randy W. Sims wrote: while (defined( my $line = )) { if ( /-+ pam_unix Begin -+/ .. /-+ pam_unix End -+/ ) { # between beginning and end } } err, that was obviously not tested. Should be: while (defined( my $line = )) { if ( $line =~ /begin/ .. $line =~

Re: Regex for logwatch report

2004-10-05 Thread Kevin Old
On Tue, 05 Oct 2004 22:36:45 -0400, Randy W. Sims <[EMAIL PROTECTED]> wrote: > On 10/5/2004 10:25 PM, Kevin Old wrote: > > Hello everyone, > > > > I'm parsing a Logwatch report I get daily from my server and have hit > > a snag. I'd like to grab everything between the "pam_unix Begin" line > > and

Re: Regex for logwatch report

2004-10-05 Thread Randy W. Sims
On 10/5/2004 10:25 PM, Kevin Old wrote: Hello everyone, I'm parsing a Logwatch report I get daily from my server and have hit a snag. I'd like to grab everything between the "pam_unix Begin" line and the "pam_unix End" line. - pam_unix Begin sshd:

Regex for logwatch report

2004-10-05 Thread Kevin Old
Hello everyone, I'm parsing a Logwatch report I get daily from my server and have hit a snag. I'd like to grab everything between the "pam_unix Begin" line and the "pam_unix End" line. - pam_unix Begin sshd: Invalid Users: Unknown Account: