How to use match in alertmanager template

I am new to go template and can’t figure out how to match a string from a label value.

For security reason i can’t display my instance label, The instance can be xxxxx. or xxxx-

I tried {{ match “.” .Value }}
or “.-.
So i am trying to match . or - and then slice last part of it. but not able to use patch in alertmanager template.

Appreciate any suggestions.

-S