Sweet. I always forget about the little things Perl does for you in the
background.
-Original Message-
From: kim, kiseok
To: [EMAIL PROTECTED]
Sent: 3/21/02 11:00 PM
Subject: Re: Regarding reg. expr
$. is line number of the last file handle :-)
so,
my $counter;
while(){
if
ve the regex compiled only once.
|
| my $counter;
| while(){
|$counter++;
|if($_ =~ /(\b$input\b)/){
| print "Found match on line number $counter\n";
|}
| }
|
|
| -Original Message-
| From: viswanathan sundararajan
| To: Timothy Johnson
| Sent: 3/21/02 9:46 PM
| Su
unter++;
if($_ =~ /(\b$input\b)/){
print "Found match on line number $counter\n";
}
}
-Original Message-
From: viswanathan sundararajan
To: Timothy Johnson
Sent: 3/21/02 9:46 PM
Subject: RE: Regarding reg. expr
Hi,
Thanx for ur reply.This is exactly what i am
loo
m: viswanathan sundararajan
To: [EMAIL PROTECTED]
Sent: 3/21/02 9:14 PM
Subject: Regarding reg. expr
Hi group,
I have the following code.
$in=join("\n",@rootwords);
while($in=~/(\b$input\b)/g)
{
.
.
}
Is there any way of finding out the line no where
$in
Hi group,
I have the following code.
$in=join("\n",@rootwords);
while($in=~/(\b$input\b)/g)
{
.
.
}
Is there any way of finding out the line no where
$input is matched with $in.$in may contains many
instances of $in.I need all those line nos.
Thanx in advance,
vi
walter valenti[SMTP:[EMAIL PROTECTED]]
> Sent: Friday, September 21, 2001 8:23 PM
> To: [EMAIL PROTECTED]
> Subject: reg expr
>
> How i can write a reg. expr for find the IP address in log file like:
>
> 15:46:25.967683 194.244.46.38.1412 > 207.88.221.53.119: . a
At 04:53 PM 9/21/2001 +0200, walter valenti wrote:
>How i can write a reg. expr for find the IP address in log file like:
>
>15:46:25.967683 194.244.46.38.1412 > 207.88.221.53.119: . ack 1115 win
>8760 (DF)
>15:46:26.600505 194.244.46.38.1412 > 207.88.221.53.119: P 15:21(6) a
Here is one way:
(/(\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})/g)
-Original Message-
From: walter valenti [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 10:53 AM
To: [EMAIL PROTECTED]
Subject: reg expr
How i can write a reg. expr for find the IP address in log file like:
15:46
ln: 3 194.244.46.38
ln: 3 207.88.221.53
ln: 4 194.244.46.38
ln: 4 207.88.221.53
ln: 5 207.88.221.53
ln: 5 194.244.46.38
Wags ;)
-Original Message-
From: walter valenti [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 21, 2001 07:53
To: [EMAIL PROTECTED]
Subjec
How i can write a reg. expr for find the IP address in log file like:
15:46:25.967683 194.244.46.38.1412 > 207.88.221.53.119: . ack 1115 win
8760 (DF)
15:46:26.600505 194.244.46.38.1412 > 207.88.221.53.119: P 15:21(6) ack
1115 win 8760 (DF)
15:46:26.600972 194.244.46.38.1412 > 207.88.2
10 matches
Mail list logo