sub chewitup { for($i=0; $i<$array_size; $i++){ chomp($data[$i]); if($data[$i] =~ /Message Type:/){ @details0=split / /, $data[$i]; unless($data[$i] eq $blank){ if($data[$i] =~ /Error Code:/){ @details2=split / /, $data[$i]; } if($data[$i] =~ /Transaction Time:/){ @details1=split / /, $data[$i]; } next $i; } $txname=$details0[2]; $txtime=$details1[2]; $errorcode=$details2[2]; print OUT "$txname\t\t\t$txtime\t\t$errorcode\n"; } } }
In reply to Re^2: Regex to select multiple lines
by beeny
in thread Regex to select multiple lines
by beeny
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |