namishtiwari has asked for the wisdom of the Perl Monks concerning the following question:
My regular expression the if statement is not correct, kindly help me in correcting it. Thanks NT#!/usr/bin/perl -w my $timestamp; my $line = "Fri May 29 18:29:57.357 2009 Morocco Standard Time INFO: p +id 3216 tid 1724: 170: 132192: apricocot Native Server: recvd AA_BIN_ +MSG_VER_CHG"; if ($line =~ /^(.*) INFO: .* recvd AA_BIN_MSG_VER_CHG/) { $timestamp = $1; print $timestamp; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regular expression problem
by binf-jw (Monk) on Jun 12, 2009 at 12:51 UTC | |
|
Re: regular expression problem
by planetscape (Chancellor) on Jun 12, 2009 at 12:25 UTC | |
|
Re: regular expression problem
by Corion (Patriarch) on Jun 12, 2009 at 12:18 UTC | |
by namishtiwari (Acolyte) on Jun 12, 2009 at 12:26 UTC | |
by namishtiwari (Acolyte) on Jun 12, 2009 at 12:44 UTC |