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

Help with the RegEx for tagging rule

AK
Advisor

Hi Folks,

 

I would need some help in defining a tagging rule that can match the set of hosts and assign tag to them.

 

The hostnames could be like below,

host1, host2, host3, server1, server2, machine1, machine2

 

and the expression I tried was

host|server|machine bot it matches only host1 host2 and host3.

 

Please help me to build RegEx that can match all listed hosts

 

Regards,

AK

2 REPLIES 2

ryan_ott
Dynatrace Mentor
Dynatrace Mentor

Hello,

Try placing the regex in parentheses like this: "(?>host|server|machine)"
Also, make sure you are selecting Host Name contains regex.

Please see the screenshots below for how I was able to mimic this functionality. Hope this helps!

ryan_ott_0-1627682099157.pngryan_ott_1-1627682107386.png

-Ryan

ACE Consultant, Dynatrace Services
Dynatrace Certified Professional

AK
Advisor

Great it worked Ryan. Thanks for helping me out.