At 08:14 22.06.2001 -0800, Michael Fowler wrote:
>On Fri, Jun 22, 2001 at 04:26:43PM +0200, Aaron Craig wrote:
> > $results{$test}++ if($_ =~ /joe/ && $_ !~ /fred/);
>
>Or, more succinctly:
>
> $results{$test}++ if /joe/ && !/fred/;
I'm still trying to get my brain used to Perlese. :)
Aaron
what is desired is Joe yes, Fred No ?
>
> Wags ;)
>
> -Original Message-
> From: Chas Owens [mailto:[EMAIL PROTECTED]]
> Sent: Friday, June 22, 2001 08:50
> To: [EMAIL PROTECTED]
> Subject: Re: 2 regex questions
>
>
> On 22 Jun 2001 16:26:43 +0200, Aaron C
On Fri, Jun 22, 2001 at 04:26:43PM +0200, Aaron Craig wrote:
> $results{$test}++ if($_ =~ /joe/ && $_ !~ /fred/);
Or, more succinctly:
$results{$test}++ if /joe/ && !/fred/;
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
Is this not saying Add if neither joe and fred are in the line while
what is desired is Joe yes, Fred No ?
Wags ;)
-Original Message-
From: Chas Owens [mailto:[EMAIL PROTECTED]]
Sent: Friday, June 22, 2001 08:50
To: [EMAIL PROTECTED]
Subject: Re: 2 regex questions
On 22 Jun
On 22 Jun 2001 16:26:43 +0200, Aaron Craig wrote:
> At 09:49 22.06.2001 -0400, Yacketta, Ronald wrote:
> >Folks,
> >
> >Is this syntax correct for finding multiple words in a line?
> > $results{$test}++ if /$test/ && /Factory/ && /failed/;
>
> Looks good.
>
> >also, what would the syntax
Thanxs!
> $results{$test}++ if /$test/ && /Factory/ && /failed/;
>
> Looks good.
>
> $results{$test}++ if($_ =~ /joe/ && $_ !~ /fred/);
At 09:49 22.06.2001 -0400, Yacketta, Ronald wrote:
>Folks,
>
>Is this syntax correct for finding multiple words in a line?
> $results{$test}++ if /$test/ && /Factory/ && /failed/;
Looks good.
>also, what would the syntax be to find a word in a line that does
>not contain another word? so
Folks,
Is this syntax correct for finding multiple words in a line?
$results{$test}++ if /$test/ && /Factory/ && /failed/;
also, what would the syntax be to find a word in a line that does
not contain another word? something similar to
grep joe output | grep -v fred
Best regards