in reply to Re: key value pair or simply a regexp
in thread key value pair or simply a regexp
for loop on hash output ########################KEY: msgagt VALUE: ESM_WMB_AIX KEY: _id VALUE: severity KEY: e VALUE: AEM001 KEY: SM_Integrator.InsertToSYSLOG Use of uninitialized value in print at parse_4_ovo.plx line 22, <$out> + line 7. VALUE: KEY: /DataFlowEngine/ImbRdl/ImbRdlThrowExceptionStatements.cpp: 158 +: SqlThrowExceptionStatement::execute: ComIbmComputeNode: MS_Alert_ES +M_Integrato Use of uninitialized value in print at parse_4_ovo.plx line 22, <$out> + line 9. VALUE: KEY: r#FCMComposite_1_2 Use of uninitialized value in print at parse_4_ovo.plx line 22, <$out> + line 11. VALUE:
maybe something like this, but even this is not exactly what I need:_id -- severity e -- AEM001 msgagt -- ESM_WMB_AIX
__OUTPUT__my $data = qq#'msgagt=ESM_WMB_AIX,sec_id=Sec_id,severity=Low,node=test,msgnode=qw +mbap01.cardinalhealth.net,utc={2007-04-26 18:01:59.472+00:00},om={UID=3a7affd6-f420-11db-80b1-000000000000,Alert +Code=AEM001,AlertType=AEM-default,AppName=AEM-CommonService2,Message= +5004:An error has been reported by the BIPXML4C component.:XML}' #; print "$_\n" for $data =~ /((?:\w+=\w+)|(?:\w+=\{.*?\}))/g;
msgagt=ESM_WMB_AIX sec_id=Sec_id severity=Low node=test msgnode=qwmbap01 UID=3a7affd6 AlertCode=AEM001 AlertType=AEM AppName=AEM Message=5004
|
|---|