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; }
In reply to regular expression problem by namishtiwari
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |