26 Sep 2022 12:25 PM
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
Solved! Go to Solution.
26 Sep 2022 12:54 PM
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.
26 Sep 2022 01:29 PM - edited 26 Sep 2022 01:32 PM
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:
26 Sep 2022 01:47 PM
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