Rename by Regex is not giving the expected result

I want to get just a part of it for an Instance Name in an STAT Panel.

The string is: abc_join_status{instance=“snhucs01.city.com”, job=“work”}

The regex I am using is (snhucs[^."]+)

So I just should get the result of snhucs01… but it doesn’t work
in the Transform - Section of my Grafana Query.

I know I have to use the Golang Syntax. And it works perfect if I am testing it under:

https://regex101.com

Any suggestions?

Thanks in advance

1 Like