Re: 2 regex questions

2001-06-25 Thread Aaron Craig
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

RE: 2 regex questions

2001-06-22 Thread Chas Owens
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

Re: 2 regex questions

2001-06-22 Thread Michael Fowler
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

RE: 2 regex questions

2001-06-22 Thread Wagner-David
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

Re: 2 regex questions

2001-06-22 Thread Chas Owens
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

RE: 2 regex questions

2001-06-22 Thread Yacketta, Ronald
Thanxs! > $results{$test}++ if /$test/ && /Factory/ && /failed/; > > Looks good. > > $results{$test}++ if($_ =~ /joe/ && $_ !~ /fred/);

Re: 2 regex questions

2001-06-22 Thread Aaron Craig
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

2 regex questions

2001-06-22 Thread Yacketta, Ronald
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