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

Help Applying a Cleaning Rule for a User Tag in Dynatrace SaaS and Managed

victor_segovia
Inactive

We have customer with which we are monitoring RUM in some Applications using Dynatrace Managed, from one of this applications (in a certain page) we need to extract a User Name so this can be used as a User Tag for the Application; the Issue is that there is no alternative but to use a CSS Selector to extract the data, but the selector applies to more that just the User Name; so we are extracting something like this:


Welcome Mr(s): <User Name>, <Some User-Selected Welcome Phrase>, Change your Avatar (options).


We are having trouble extracting (or cleaning) this retrieved text (so we can just get the <User Name> as requested by the costumer); we tried with a cleaning rule like this:


Welcome Mr(s): ([a-zA-Z\s]*), Change your Avatar (options).


But Dynatrace refuse to accept this rule because of the additional parenthesis: “Regular Expression must contain only 1 capture group”.

What we can do to fix this? Or to extract more efficiently the User Name?

3 REPLIES 3

bernhard_lackn1
Dynatrace Advocate
Dynatrace Advocate

parantheses have a special meaning in regex.

plz try to escape them:

Welcome Mr\(s\): ([a-zA-Z\s]*), Change your Avatar \(options\).

Sadly, we have already perform your suggestion regarding the parenthesis and Dynatrace now is unable to retrieve anything.

bernhard_lackn1
Dynatrace Advocate
Dynatrace Advocate

i tested with an online regex tester(https://www.regexpal.com/):

your regex is incorrect. this one would work:

Welcome Mr\(s\): ([a-zA-Z\s]*), .*, Change your Avatar \(options\)

Featured Posts