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

Regex empty string takes match value in placeholder operation

saheba02
Frequent Guest

Hello Team

I am trying to create request naming rule to combine all email address in to one placeholder name. I am able to get this work when pattern is prefix/email-address/postfix but if api doesnt get postfix then regex gets null and pattern uses match value in postfix.

for ex. /api/abc/email@addr/def =>/api/abc/[holder]/def

but /api/abc/email@addr => /api/abc/[holder]/email@addr

here is my rule for prefix and postfix.

condition block #

operator = "REGEX_MATCHES"
value = "/[\\w.-]{1,}@[\\w.-]{1,}"

 

prefix #

delimiter_or_regex = "^(.*?/)[\\w.-]{1,}@[\\w.-]{1,}"
kind = "REGEX_EXTRACTION"

postfix #

delimiter_or_regex = "/[\\w.-]{1,}@[\\w.-]{1,}(/[^$]*+)$"
kind = "REGEX_EXTRACTION"

 

Can anyone help in this ?

 

 

1 REPLY 1

ChadTurner
DynaMight Legend
DynaMight Legend

can you please share a screen shot of what you are trying to complete? The Services Request naming is by service in the UI and Globally via the API. However it appears you can only use the available placeholders. So you would need to select that placeholder source, then regex the value. Regex is really for clean up. 

If your getting it to work but there is a variation in the rules, just create another set of rules and Dynatrace will go down the defined rules as a priority tree.

-Chad

Featured Posts