Override display name by regexp using matched groups

I want to manipulate the display name using regexp in a Grafana dashboard, say, I want to go from monitoring_prometheus_1 to prometheus, In python I would do

re.sub('monitoring_(.*)_1', r'\1', 'monitoring_prometheus_1')

Is there any way I can acheive this ?

Hi, did you managed to do that? I’m trying to do the same and cant find a way to shorten the display name, you can add a suffix easily, but I need a substring to get rid of the _temperature
TIA
image

I would also find this useful. And also this ability in the description field.

what is your data source?

If you can’t do that by your datasource means, you may try Rename fields by regex transformation offered by Grafana: