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

Regex syntax for tagging rules

Jan_VanBelle
Contributor

Hello,

 

We're trying to adapt the value of an auto-tagging rule.

In order to do so, we'd like to skip the first X characters and then return the remaining part of the string.

(this because Dynatrace does not seem to be able to deal with multiple capturing groups, which was the first attempt)

 

Current code, working via regex101: build, test, and debug regex

^.{7}\K.+

But after all, Dynatrace isn't able to deal with the '\K' part.

Are there any other solutions?

 

So, for example: the regex rule applied on

AppPoolTaggingRule

should return

TaggingRule

 

Thanks for your help,

 

    Jan

3 REPLIES 3

Jan_VanBelle
Contributor

To clarify a little further:

Optional tag value

{ProcessGroup:IISAppPool/^(......)(.*)\2\w+}

 

results in error

The placeholder '{ProcessGroup:IISAppPool/^(......)(.*)\2\w+}' is invalid: Regex not allowed - Backreferences are not allowed. Please solve this in another way.

ChadTurner
DynaMight Legend
DynaMight Legend

If the name of it starts with App Pool, you could use this

 

AppPool([^\-]*+)

Basically its looking for AppPool then grabbing what's after it.

 

Should give you a result like this: 

ChadTurner_0-1664195547608.png

 

-Chad

Thanks!

That seems to work!

 

Could you send me the link to the screenshotted page?
It could've spared me a few hours of searching 😉

 

-- Jan

Featured Posts