Regex in prometheus templating

Hi everyone,

I’m trying to create a template variable with prometheus as a datasource. My problem is that I want to use a values the result of concatenating two prometheus tags. For example:

given this result
to have this value
xx server-yy (application server)


that query returns the following result.

What I’ve done other times is write a regex like this: .*server="(.*?)".* and the values would be the value of the tag server for each result.
I’ve tried to change the regex to something like this .*application="(.*?)".*server="(.*?)".* but the result is only the application. Can someone please help me with this?

Thanks in advance