Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
I have a data file with the following format: 3642 01:19:55 01-Jan-2001 134 51909 51750 1.509667E-07 Now to extract the time, date and last column, I thought I'd use: while(<DATA>) { /^(\d+) (\d\d:\d\d:\d\d) (\d\d-\D+-\d{4}) (\d+) (\d+\s+\d+) (\d.\d(E +[+-])\d+) /; print "$2 $3 $6\n"; } But I can't get the regx to get the "E-\d\d" term!!! Please help! BTW, it this a more efficient means to get data, or is split better? Regards, Stacy.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regular expression
by Masem (Monsignor) on May 01, 2001 at 17:30 UTC | |
|
Re: Regular expression
by Anonymous Monk on May 01, 2001 at 17:40 UTC | |
by Anonymous Monk on May 01, 2001 at 17:54 UTC | |
|
Re: Regular expression
by suaveant (Parson) on May 01, 2001 at 17:47 UTC | |
by Anonymous Monk on May 01, 2001 at 18:17 UTC | |
by suaveant (Parson) on May 01, 2001 at 18:55 UTC | |
|
Re: Regular expression
by DeaconBlues (Monk) on May 01, 2001 at 19:55 UTC | |
|
Re: Regular expression
by le (Friar) on May 01, 2001 at 17:34 UTC | |
|
Re: Regular expression
by converter (Priest) on May 01, 2001 at 19:07 UTC |