props.conf
EXTRACT-IPUBMESSAGEID = <L:MESSAGEID>(?<IPUBMESSAGEID>[^<]*)</L:MESSAGEID>
EXTRACT-Parse_MESSAGEID = IPUB-(?<Component>[^_]+)_(?<LayerId>[^;_]+)[_;](?<Protocol>[^;_]+)[;_](UNKNOWN;)?(?:(?<TopicIdentifier>[^_]+)_)? in IPUBMESSAGEID
mysampleMESSAGEID
IPUB-OR_P1;JMS;UNKNOWN;OPENREACH-ESB--KCI_ArmStartInbound
IPUB-OR_P2_ArmEndInbound
IPUB-OR_P3;MQ_ArmEndInbound
IPUB-OR_MULT;JMS;UNKNOWN_ArmEndInbound
IPUB-OR_S1;JMS;/GS/T2R/FAULT/PEW_ArmEndInbound
IPUB-OR_S1;HTTP;/OR/T2R/FAULT/ACTION-REQUEST/AR-STATUS/*_ArmStartInbound
My rex was pickin the values for every message id .. expect for IPUB-OR_P2_ArmEndInbound
this is not working ..
Actually i should have the values
Componet= OR
LayerId-P1/P2/P3/MULT/S1
Protocol-MQ/JMS/HTTP
but this is not workin..
Hi!
Assuming you want the following extraction of this input:
IPUB-OR_P2_ArmEndInbound
Componet=OR
LayerId=P2
Protocol=
TopicIdentifier=ArmEndInbound
this should work:
EXTRACT-IPUBMESSAGEID = <l:messageid>(?<messageid1>[^<]*)</l:messageid>
EXTRACT-Parse_MESSAGEID = IPUB-(?<Component>[^_]+)_(?<LayerId>[^;_]+)[_;](?(?<=[_])(?<TopicIdentifier>.*$)|(?<Protocol>[^;_]+)[;_](?<TopicIdentifier>.*$)) in messageid1
For the mentioned line it would be helpful to know how you would like it to be extracted.
Hi!
Assuming you want the following extraction of this input:
IPUB-OR_P2_ArmEndInbound
Componet=OR
LayerId=P2
Protocol=
TopicIdentifier=ArmEndInbound
this should work:
EXTRACT-IPUBMESSAGEID = <l:messageid>(?<messageid1>[^<]*)</l:messageid>
EXTRACT-Parse_MESSAGEID = IPUB-(?<Component>[^_]+)_(?<LayerId>[^;_]+)[_;](?(?<=[_])(?<TopicIdentifier>.*$)|(?<Protocol>[^;_]+)[;_](?<TopicIdentifier>.*$)) in messageid1
For the mentioned line it would be helpful to know how you would like it to be extracted.
There are a couple of reasons why this is not working correctly. First of all I would recommend not using an asterisk because it is very greedy if at all possible. Second of all you cannot have multiple fields with the same name in a field extraction, ie: MESSAGE_ID. It has to be unique.
EXTRACT-IPUBMESSAGEID = ^I(?<messageid1>[^;]+);(?<ipubmessageid>[^;]+);(?<messageid2>[^;]+);(?<messageid3>[^\n]+)
Thirdly you can only extract a field from a field not an extraction. I am creating the fields Component and LayerId from messageid1
EXTRACT-Parse_MessageID = PUB-(?<Component>[^_]+)_(?<LayerId>\w+) in messageid1
Hi tgow..thanks for your reply...based on your comments i changed my props.conf like this..
EXTRACT-IPUBMESSAGEID =
EXTRACT-Parse_MESSAGEID = IPUB-(?
but even in this case i could see the extraction of Component and LayerId for MESSAGEID1 value
IPUB-OR_P2_ArmEndInbound
can you pls help..am i missing some thing ??