How can I extract a word from Mesaurements in InfluxDB to generate a label in the legend?

Hi
I have some measurements in InfluxDB that are below:

measurement": "/netdata\\.(nvidia_smi\\.gpu[0-9]_gpu_utilization)\\.utilization/"

I am trying to show the NVIDIA GPUs utilisation etc. I have completed it with the help of this JSON Schema :

{
  "aliasColors": {},
  "dashLength": 10,
  "datasource": "NetData",
  "id": 23763571993,
  "legend": {
    "alignAsTable": true,
    "avg": false,
    "current": true,
    "max": true,
    "min": false,
    "rightSide": true,
    "show": true,
    "total": false,
    "values": true
  },
  "lines": true,
  "linewidth": 1,
  "links": [],
  "nullPointMode": "null",
  "pointradius": 5,
  "renderer": "flot",
  "seriesOverrides": [],
  "spaceLength": 10,
  "targets": [
    {
      "alias": "$2",
      "dsType": "influxdb",
      "groupBy": [
        {
          "params": [
            "$__interval"
          ],
          "type": "time"
        },
        {
          "params": [
            "null"
          ],
          "type": "fill"
        }
      ],
      "measurement": "/netdata\\.(nvidia_smi\\.gpu[0-9]_gpu_utilization)\\.utilization/",
      "orderByTime": "ASC",
      "policy": "default",
      "query": "SELECT mean(\"value\") FROM \"netdata.nvidia_smi.gpu[0-9]_gpu_utilization.utilization\" WHERE $timeFilter GROUP BY time($__interval) fill(null)",
      "rawQuery": false,
      "refId": "D",
      "resultFormat": "time_series",
      "select": [
        [
          {
            "params": [
              "value"
            ],
            "type": "field"
          },
          {
            "params": [],
            "type": "max"
          }
        ]
      ],
      "tags": []
    }
  ],
  "thresholds": [],
  "title": "GPU Utilization",
  "tooltip": {
    "shared": true,
    "sort": 0,
    "value_type": "individual"
  },
  "type": "graph",
  "xaxis": {
    "buckets": null,
    "mode": "time",
    "name": null,
    "show": true,
    "values": []
  },
  "yaxes": [
    {
      "decimals": null,
      "format": "none",
      "label": "percentage",
      "logBase": 1,
      "max": "100",
      "min": "0",
      "show": true
    },
    {
      "format": "short",
      "label": null,
      "logBase": 1,
      "max": null,
      "min": null,
      "show": false
    }
  ],
  "gridPos": {
    "x": 0,
    "y": 119,
    "w": 12,
    "h": 7
  },
  "options": {
    "alertThreshold": true
  },
  "fieldConfig": {
    "defaults": {
      "custom": {}
    },
    "overrides": []
  },
  "pluginVersion": "7.3.6",
  "yaxis": {
    "align": false,
    "alignLevel": null
  },
  "timeRegions": [],
  "bars": false,
  "dashes": false,
  "fill": 0,
  "height": "",
  "percentage": false,
  "points": false,
  "stack": false,
  "steppedLine": false,
  "timeFrom": null,
  "timeShift": null,
  "fillGradient": 0,
  "hiddenSeries": false
}

There are multiple GPUs in the system, so I handled it like the following (please check the above JSON Schema):

"measurement": "/netdata\\.(nvidia_smi\\.gpu[0-9]_gpu_utilization)\\.utilization/",
      "orderByTime": "ASC",
      "policy": "default",
      "query": "SELECT mean(\"value\") FROM \"netdata.nvidia_smi.gpu[0-9]_gpu_utilization.utilization\" WHERE $timeFilter GROUP BY time($__interval) fill(null)",
      "rawQuery": false,

And I’m trying to print each GPU name with the help of Alias By $ but it’s printing the positional argument from measurement.
I Need to print this like below:

gpu0 or GPU0
gpu1 or GPU1
gpu2 or GPU2

Instead of

gpu0_gpu_utilization
gpu1_gpu_utilization
gpu2_gpu_utilization

Because this legend takes up too much space, I am unable to view more graph details.
I’m trying to resolved it with the help already posted solutions but I’m unable to find these option in my Grafana version 7.3.6.
I am also unable to find the regex rename planned for the transform tab in Grafana.

Here are my environment details:

OS : Debian GNU/Linux 10 (buster)
Kernel : 5.10.0-0.deb10.16-amd64
GRAFANA: 7.3.6
GRAFANA_IMAGE_RENDERER_PLUGIN_TAG: v3.3.0
GRAFANA_NETDATA_PLUGIN_VERSION: 1.0.12

Additionally, is there have any parameter to show bus id instead of gpu0 etc ?

Please suggest a solution to this.
Thanks in advance !