and test.log being the above, i found that the that entry is one line, so the output i get it#!/usr/bin/perl use strict; use warnings; my @tags = qw( 8= 9= 35= ); my $reg_ex = join( '|', @tags ); open(FH, "test.log")||die("Unable to open log file: $! \n"); while(<FH>) { print "$_\n" if ( $_ =~ /$reg_ex/s ); }
What i really want to do is be able to pull out each of the tage, so break up the line and say look for 35= and give me whatever is after that, and then carry on and say find 109= and and give me everything after that. The problem i see is that there is no break between them.$ perl t.pl 2005/11/18 00:06:49:875: FIXPump: Received data on connection {OBMSCNX +} [8=FIX.4.29=040435=849=EXLINK256=DB_ORDER50=DESRISKGATEWAY57=DCN323 +0134=4045052=20051118-05:06:491=ATOP116=0.0000000011=DES:fud630_20051 +11814=15.000017=0131730433520=031=138.0800000032=15.000037=1317260622 +38=15.000039=254=155=ContractNum60=20051118-05:06:49150=2151=0.000019 +8=13173047101317260622109=DCN3230163=0167=FUT200=200512207=TSE40=244= +138.080000005113=06556=20051117-23:06:4610=230]
In reply to Re^2: Message regex
by minixman
in thread Message regex
by minixman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |