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

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

Need Help in Regex Match text in Method Argument

ymaaa
Organizer

Hi There,

I'm creating a business transaction need splitting by a keyword in method argument.

The sample argument is as below,

......LoggerServiceProxy.process;dm:node-kind()="document", dm:node-name()="null", dm:string-value()="51741MaintainDNXByEMailAddress1707111527296638158555010194149241707111527296633045875810194149241.32718Informatio......

I want to extract "MaintainDNXByEMailAddress" for splitting. I see the pattern as I need all letters after quotation mark"and five digit. I use regex "([0-9]{5})[a-zA-Z]. That only give me five digits 51741.

Can anyone have experience of regex help me?

Thanks

YC

2 REPLIES 2

florent_duchate
Dynatrace Pro
Dynatrace Pro

Hi

This regex is doing exactly what you have specified. Find 5 digits followed by a letter and extract the digits. The brackets are in the wrong place. You need [0-9]{5}([a-zA-Z]+)[0-9].

I haven't tested it by hopefully it will get you the string.

ymaaa
Organizer

Thanks, Florent. That works.