Hi,
I have a large file with lines of style as and I need to extract the time:
...
58702 a ... 21:13:00,236 ... b2 0EP
7 33 1,0 t2.3.22 aco 55.33.kk
58 cc ... 21:33:22,236 ... b2f 00:02 0EP
7 555 1,0 t2.3.22 aco 55.33.kk
...
689 a ... 21:33:22,236 ... 00:13 b1 00:02 0EP
7 969 1,0 t2.3.22 aco 55.33.kk
...
58702 aww ... 21:33:22,236 ... 00:13 b2 00:02 0EP
7 969 1,0 t2.3.22 aco 55.33.kss
...
My pattern is t2.3.22 aco, so I need to extract all lines that have this pattern. Next I need to have the time. I am trying do something as:
if(/^(\d+)\t([\t]+)\t2.3.22.*?$/){
$s = $1 ; $t1 = $2 ; $t1 =~ s/,/./ ;
if($t1 =~ /(\d+)
\d+)
[\d.]+)/) {
$t1 = $1 * 3600 + $2 * 60 + $3 ;
....
}
but, it doesn't work fine. This isn't correct. Can anybody help me?
Thanks.
I have a large file with lines of style as and I need to extract the time:
...
58702 a ... 21:13:00,236 ... b2 0EP

58 cc ... 21:33:22,236 ... b2f 00:02 0EP

...
689 a ... 21:33:22,236 ... 00:13 b1 00:02 0EP

...
58702 aww ... 21:33:22,236 ... 00:13 b2 00:02 0EP

...
My pattern is t2.3.22 aco, so I need to extract all lines that have this pattern. Next I need to have the time. I am trying do something as:
if(/^(\d+)\t([\t]+)\t2.3.22.*?$/){
$s = $1 ; $t1 = $2 ; $t1 =~ s/,/./ ;
if($t1 =~ /(\d+)


$t1 = $1 * 3600 + $2 * 60 + $3 ;
....
}
but, it doesn't work fine. This isn't correct. Can anybody help me?
Thanks.