Relevance based on first few characters on a computer name?

(imported topic written by flayofish91)

Trying to set relevance based on computer name to exclude our virtual machines, as they lose all their changes once they restart.

the virutal machines start with “xen”.

Tried searching forums and variations in the Q&A with no luck.

-thanks!

(imported comment written by flayofish91)

Heh,

Once again, just figured it out. For those of you that would find this useful, the correct syntax was:

not(computer name starts with “XEN”)

Apologies all around :slight_smile:

(imported comment written by SystemAdmin)

Or you could also do…

computer name does not start with “XEN”

Also, keep in mind that the comparison is case sensitive. To eliminate that issue, force it to uppercase or lowercase when comparing.

Such as:

computer name as uppercase does not start with “XEN”

or

computer name as lowercase does not start with “xen”

-Paul

(imported comment written by JackCoates91)

flayofish wins at 37 characters, but Paul establishes par at 53 with case sensitivity. Sadly we’ve made regex switches human readable, so you can’t get into the really awesome Relevance Golf scores… I’ve got a pitiful 73.

not exists (matches (case insensitive regex “^XEN”) of computer name)

(imported comment written by SystemAdmin)

Surprised no one tried this one:

not(computer name as lowercase starts with “xen”)

50

-Jim