cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

This product reached the end of support date on March 31, 2021.

Unable to get appropriate Splitting by regex

pallavi_valsang
Participant

Hi,

Am trying to get 'FU_DF' from the below Value while using regex marked in bold:

Header : <> Repeater : <> Footer : <> Error : <FU_DF> processDateTime : <> lockedUserNo : <> actionBeingPerformed : <> headerMap : <{ALL_RECORDS={STATUS=FALSE, ERROR_DESC=DUPLICATE FILE FOUND, REFERENCE_NUM=-1, ERROR_CODE=FU_DF}, INPUT_REFERENCE_NO=C755181116143846}> repeaterMaps : <> forwardCode : <>

The regex, I have used is (.*Error:<(.*)>process) by which it shows correct pattern which is required.

But its not showing any data when I add the same in Business transaction. I have even tried many more combinations for the same but they all are not working for dynatrace.

Please help.

Regards,

Pallavi

7 REPLIES 7

Radu
Dynatrace Pro
Dynatrace Pro

Hi Pallavi,

From what I can see you have a whitespace after "Error", after ":", and after ">" which are not present in the regex. Additionally, your second 'any character rule' (.*) will expand greedily to match everything in the text so you can't stop it with "> process".

I think your correct regex is .*Error : <(.*)?> process

I added the '?' to stop the .* from matching your whole error message and also the needed whitespaces to match the syntax of your error message.

Try out your regexes at https://regex101.com/ - really simple to use and visually explains what does and doesn't match.

Hope this helps,

Radu

Radu
Dynatrace Pro
Dynatrace Pro

Although really there is no need for the .* in the beginning.

So you can shorten it to Error : <(.*)?> process

Hi,

I have tried this option even but unable to get any data in BT.

Attached the screenshot fileupload-error-regex.png

Please help.

pallavi_valsang
Participant

Hi,

I have tried this option even but unable to get any data in BT.

Please help.

I imagine that you have placed a sensor over this method an enable the return capture of this method right?

Yes thats correct. I have placed sensor and enabled return type for the method.

Hi Pallavi,

Can you upload a session file and include a copy of your current BT?