outputs:#!/usr/bin/perl use strict; use warnings; #open my $F, '>', $file or die "can't open $!\n"; while (my $line = <DATA>) { chomp $line; my ( $date, $version ) = $line =~ m{ \A Info: \s (.*?):Building.*? version \s ([\d\.]+) }xms; + print "$date $version \n"; } __DATA__ Info: Wed Mar 28 18:53:03 2007:Building IVR Designer version 06.00.08. +... Info: Wed Mar 28 18:53:03 2007:Building IVR Designer version 06.00.08. +... Info: Wed Mar 28 18:56:31 2007:Building IVR Designer version 6.0 Compl +eted !!
The version is not correct, but it is because you truncated the output? If not: when you understand the regex, it should be easy to fix.Wed Mar 28 18:53:03 2007 06.00.08.... Wed Mar 28 18:53:03 2007 06.00.08.... Wed Mar 28 18:56:31 2007 6.0
In reply to Re: how to extract fields from the output and how to convert it to html format
by lima1
in thread how to extract fields from the output and how to convert it to html format
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |