Re: regexp ... On 5/10/07, oryann9  wrote:> > > Now I am trying to break up string into individual> > > chars, but this does not seem to work:> > snip> >> > The idiomatic way is> >> > for my $chr (split //, $str) {> > }>> ok thanks for this code, but that produces the same> output as the unpack. :)>> The original code (\\w+\\=\\w+,) seems work but is> grabbing all the garbage infront:>> ere Broker v6003[2998366]:> (QWMB01.EG500)[8225]BIP2951I: Event generated by user> code. Additional information :> 'msgagt=ESM_WMB_AIX,sec_id=Sec_id,severity=Low,msgnode=qwmbap01.cardinalhealth.net,utc={2007-04-26> 18:01:59.472+00:00},om={UID=3a7affd6-f420-11db-80b1-000000000000,AlertCode=AEM001,AlertType=AEM-default,AppName=AEM-CommonService2,Message=5004:An> error has been reported by the BIPXML4C> componedbsmith@DUBHADM1# vi parse_4_ovo.plx> 2,cma={Location=Not_found,BusUnit=Not_found}>>>> Goal is:>> msgagt=ESM_WMB_AIX> sec_id=Sec_id> severity=Low> msgnode=qwmbap01.cardinalhealth.net> utc={2007-04-26 18:01:59.472+00:00}> om={> UID=3a7affd6-f420-11db-80b1-000000000000> AlertCode=AEM001> AlertType=AEM-default> AppName=AEM-CommonService2> Message=5004:An error has been reported by the> BIPXML4C component.:XML> }

Since you haven't provided the original data, it's a bit difficult togive advice. There's nothing here, for instance, to show what you hopeto gain by splitting the string into characters. It looks to me likeyou have CSV and want to split on the commas:
    my @info = split /,/, $_;    $info[0] =~ s/^.*?'//; # get rid of leading garbage    my @om = split /,/, $info[4];
That assumes "'" and "," are invalid characters elsewhere in thestring. They probably are.
HTH,
-- jay--------------------------------------------------This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]private and confidential
daggerquill [at] gmail [dot] comhttp://www.tuaw.com  http://www.downloadsquad.com  http://www.engatiki.org
values of Î² will give rise to dom!

