![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Regex | saikrishnan7 | Shell Programming and Scripting | 1 | 05-30-2009 09:38 PM |
| Simple regex problem? | muay_tb | Shell Programming and Scripting | 1 | 03-31-2009 10:49 PM |
| Problem with grep Regex Error | lweegp | Shell Programming and Scripting | 6 | 11-16-2006 04:04 AM |
| gcc 3.4 Regex problem | manishs13 | SUN Solaris | 0 | 05-09-2005 04:58 AM |
| grep regex problem | iceman | Shell Programming and Scripting | 2 | 02-06-2005 12:44 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
regex problem
Hi, Code:
#!/usr/bin/perl -w
my $timestamp;
my $line = "Fri May 29 18:29:57.357 2009 Morocco Standard Time INFO: pid 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;
}
My regular expression the if statement is not correct, kindly help me in correcting it. Thanks NT Last edited by namishtiwari; 06-12-2009 at 11:06 AM.. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|