On Aug 31, 6:05 pm, [EMAIL PROTECTED] (Chris E. Rempola) wrote:
> I'm trying to parse qmail-qread data, but don't know how to find the
> number of occurrences after a particular string. Here is the data:
>
> +++ Beginning of data +
> 28 Aug 2007 17:0
On 9/2/07, Chas Owens <[EMAIL PROTECTED]> wrote:
> On 9/2/07, Chris E. Rempola <[EMAIL PROTECTED]> wrote:
> > Thanks for all your help thus far. If I wanted to view the numbers to
> > the right of the pound sign(#) also, how would I go about doing that?
> > Is creating another value to the key the
On 9/2/07, Chris E. Rempola <[EMAIL PROTECTED]> wrote:
> Thanks for all your help thus far. If I wanted to view the numbers to
> the right of the pound sign(#) also, how would I go about doing that?
> Is creating another value to the key the right idea?
snip
>if ( /#.*\d+\s+\d+\s+(\S*)
Thanks for all your help thus far. If I wanted to view the numbers to
the right of the pound sign(#) also, how would I go about doing that?
Is creating another value to the key the right idea?
+++ Beginning of data +
28 Aug 2007 17:00:47 GMT #88
On Aug 31, 6:05 pm, [EMAIL PROTECTED] (Chris E. Rempola) wrote:
> I'm trying to parse qmail-qread data, but don't know how to find the
> number of occurrences after a particular string. Here is the data:
>
> +++ Beginning of data +
> 28 Aug 2007 17:0
Chris E. Rempola wrote:
John W. Krahn wrote:
my ( $key, %data );
while ( <> ) {
if ( /#.*\s(\S+)/ ) {
$key = $1;
}
elsif ( /\sremote\s/ ) {
$data{ $key }++;
}
}
for my $key ( keys %data ) {
print "'$key' sent $data{$key} emails.\n";
}
John
Chris E. Rempola wrote:
I'm trying to parse qmail-qread data, but don't know how to find the
number of occurrences after a particular string. Here is the data:
+++ Beginning of data +
28 Aug 2007 17:00:47 GMT #8807850 41428 <[EMAIL PROTECTED]>
On 9/2/07, Chris E. Rempola <[EMAIL PROTECTED]> wrote:
> Chas Owens wrote:
> >
> > The pattern /#.*\s(\S+)/ matches a literal # followed by anything up
> > to a space and captures all contiguous non-space characters:
> >
> > "31 Aug 2007 04:00:22 GMT " prematch
> > "#" matches #
> > "8810118 3375
Chas Owens wrote:
The pattern /#.*\s(\S+)/ matches a literal # followed by anything up
to a space and captures all contiguous non-space characters:
"31 Aug 2007 04:00:22 GMT " prematch
"#" matches #
"8810118 337545 <[EMAIL PROTECTED]>" matches .*
" " matches \s
"bouncing" matches \S+
Even
On 9/1/07, Chris E. Rempola <[EMAIL PROTECTED]> wrote:
snip
> Can you explain the regex syntax of /#.*\s(\S+)/
>
> How does that match the email address? The reason why I ask is because
> I have one occurrence with the ouput of:
>
> OUTPUT +
> 'bouncing' sent 402 emails.
> /OUTPU
John W. Krahn wrote:
my ( $key, %data );
while ( <> ) {
if ( /#.*\s(\S+)/ ) {
$key = $1;
}
elsif ( /\sremote\s/ ) {
$data{ $key }++;
}
}
for my $key ( keys %data ) {
print "'$key' sent $data{$key} emails.\n";
}
John - Thanks so much! Exactl
Ken Foskey wrote:
On Fri, 2007-08-31 at 18:05 -0700, Chris E. Rempola wrote:
I'm trying to parse qmail-qread data, but don't know how to find the
number of occurrences after a particular string. Here is the data:
+++ Beginning of data +
28 Aug 2
Chris E. Rempola wrote:
I'm trying to parse qmail-qread data, but don't know how to find the
number of occurrences after a particular string. Here is the data:
+++ Beginning of data +
28 Aug 2007 17:00:47 GMT #8807850 41428 <[EMAIL PROTECTED]>
On Fri, 2007-08-31 at 18:05 -0700, Chris E. Rempola wrote:
> I'm trying to parse qmail-qread data, but don't know how to find the
> number of occurrences after a particular string. Here is the data:
>
> +++ Beginning of data +
> 28 Aug 2007 17:00:4
I'm trying to parse qmail-qread data, but don't know how to find the
number of occurrences after a particular string. Here is the data:
+++ Beginning of data +
28 Aug 2007 17:00:47 GMT #8807850 41428 <[EMAIL PROTECTED]>
done remote [EMAIL P
15 matches
Mail list logo