--- Tim Johnson <[EMAIL PROTECTED]> wrote:
>
>
> You mean like this? I'm not 100% sure what you're
> asking.
I guess not. For example,
Wed Jan 12 03:50:18 PHT 2005 updating...
Sun Jan 9 10:00:10 PHT 2005 not updating
Fri Jan 7 09:40:14 PHT 2005 down
Sat Jan 31 19:18:53 PHT 2004 down
Sat Jan 31 13:25:15 PHT 2004 down
Sat Jan 31 10:46:09 PHT 2004 not updating
I just wanted to tell my program to look for those
lines that contains both Jan and 2005 regardless of
their positions. I've tried matching /(Jan & Dec)/ but
it didn't worked. Any more idea?
>
>
>
> ##########################################
>
> use strict;
> use warnings;
>
> open(INFILE,"<myfile.txt") || die "Couldn't open
> 'myfile.txt' for
> reading!\n";
>
> my @LinesIWantToKeep;
>
> while(<INFILE>){
> if($_ =~ /Jan 12/){
> push @LinesIWantToKeep,$_;
> my $line = <INFILE>;
> push @LinesIWantToKeep,$line;
> }else{
> <INFILE>;
> }
> }
>
> print @LinesIWantToKeep;
>
> ###########################################
>
>
> -----Original Message-----
> From: Harold Castro [mailto:[EMAIL PROTECTED]
> Sent: Thursday, February 03, 2005 3:55 PM
> To: [email protected]
> Subject: Is there a regexp that will match two or
> more expressions???
>
> Hi,
>
> I'm looking for a regexp that will match two
> expressions. Each line of the file I'm reading
> contains different months and years. I'm only after
> those lines with particular year and month. All
> those
> lines with january and 2005 for example. Any idea?
> Thanks!
> here's a portion of the file.
>
>
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>